Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Leaf

Pages: [1]
1
Programming / Some reimplemented Java FOV algorithms (Basic,RPAS)
« on: December 03, 2011, 10:31:36 PM »
Howdy folks.  Just wanted to share a bit of FOV code.

It seems to be reasonably fast, though I'd like to remove the need to re-process the returned set of visible points via clever use of generics and inheritance....

The test machine is a 2.1GHz Phenom 8450 Triple-Core Processor (though it's only running on one core) running Linux Morrigan 2.6.38-12-generic-pae #51-Ubuntu SMP Wed Sep 28 16:11:32 UTC 2011 i686 athlon i386 GNU/Linux.

The test environment is Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

Code: [Select]
Running speed test (this will give more accurate results than a single run, because the hotspot JIT will have time to kick in).
Test size is 133x133 area.
Field of view object is RPAS.
..........
Average time per pass: 0.5167ms (1935 fields of view per second).

Code: [Select]
Running speed test (this will give more accurate results than a single run, because the hotspot JIT will have time to kick in).
Test size is 133x133 area.
Field of view object is Basic.
..........
Average time per pass: 0.6307ms (1585 fields of view per second).

The source for everything it a teeny bit too long to fit into one post, so I'll put it up in replies...

Pages: [1]