View Single Post
Old 29 July 2009, 19:19   #50
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Hello again boys.

Well, I went away and optimised my 3D wireframe cube routine.

Check out the attached source code for the optimised version but in brief, the improvements are:

There are no more x,y,z angle tabs - just 2^14 fixed point cos and sin tables.

The number of muls in the build_matrix and rotate_points routines has been reduced from 88 to 20.

The two muls #256 from the perspective_transform routine have been replaced with ext.l and lsl.w #8. That should make StingRay's eyes feel better!

I still need to add double buffering and improve the cos and sin tabs so that the cube is less shaky but it's definitely now a much faster routine.

Talking of which, StingRay, would you mind running the new version through your speed tester routine so I can get an idea of just how much faster it is?

Last edited by pmc; 26 February 2010 at 12:23.
pmc is offline  
 
Page generated in 0.04240 seconds with 10 queries