FloatArray rewrite
Return to home page
Comments Loading...
2008-09-01

It took me the long weekend (on and off, I did other things too!) to redo the 7 lessons (now 6) using FloatArray, VertexArray and my new VectorN and MatrixN and ColorN classes which are also subclasses of FloatArray.

I think it was a worthwhile rewrite. The objects lend themselves to the way OpenGL actually operates well. As a result, I decided to redo the GPU math test to see what numbers I could get now that things are easier to work with. The results are staggering. I could get a consistent 2000% to 3000% improvement using C to do the floating point math, but the GPU wins on bigger data sets easily:

Runs Size CPU GPU Speedup
1000 1000 0 2 0%
100 10000 12 7 171%
100 100000 150 34 441%
10 1000000 4254 157 2709%
1 10000000 176291 1376 12812%