Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Shared Code / Re: Fastest get2fold algorithm on: 2006-03-28 03:12:49
Interesting, on my centrino laptop the BS method is actually 2x faster than p2bound4 but on my P4 its slower??
2  Game Development / Shared Code / Re: Fastest get2fold algorithm on: 2006-03-27 04:04:28
Excluding the raw lookup table approach, the p2Bound4 algorithm is the fastest so far, by about 20%.. nice.
3  Game Development / Shared Code / Re: Fastest get2fold algorithm on: 2006-03-22 02:29:16
Interesting that you say this is the fastest algorithm, which it is not. While it may be in the general case when one uses it in a certain context knowing the upper and lower bounds then a lookup table will be the fatest method (3-4x faster than BS) :-)

i.e.

   static final int[] lookupTable;
   static {
      lookupTable = new int[MAX_LOOKUP];
      for(int i = 0; i < MAX_LOOKUP; i++)
         lookupTable = get2FoldUnrolled(i);
   }
   
   public final static int get2FoldLookup(int val) {
      return lookupTable[val];
   }
   
Your application will probably hit a certain input range 90% of the time, in which case you use the lookup table method. For all other input values you use the BS method.

Its always a space/time tradeoff.
4  Game Development / Shared Code / Re: MoreMath (FastMath) on: 2006-03-20 11:32:30
hmmm

convertToRGB() should probably have the higher order bits all on anyway (ie. alpha 255, or 1.0) as does AlphaComposite.getAlpha() when no alpha is set.

Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (11 views)
2014-07-24 01:59:36

Riven (9 views)
2014-07-23 21:16:32

Riven (11 views)
2014-07-23 21:07:15

Riven (12 views)
2014-07-23 20:56:16

ctomni231 (42 views)
2014-07-18 06:55:21

Zero Volt (38 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (34 views)
2014-07-16 23:30:00

Cero (49 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!