The Artima Developer Community
Sponsored Link

Agile Buzz Forum
FloatArray rewrite

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
FloatArray rewrite Posted: Sep 1, 2008 10:05 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: FloatArray rewrite
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

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%

Read: FloatArray rewrite

Topic: Well-factored code Previous Topic   Next Topic Topic: ESUG Day 5

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use