digitalmars.D - Inline Functions
- Mason Green (Zzzzrrr) (7/7) Feb 24 2009 Hello,
- Mason Green (8/8) Feb 25 2009 Hi,
- Daniel Keep (4/17) Feb 25 2009 Maybe if you have spare time, you could write a blog post or article on
- bearophile (7/12) Feb 25 2009 Why do you use lines with a thickness of 2?
Hello, I'm looking for ways to optimize Blaze, the D port of Box2D, and running into some frustrations. In fact, the same Java port (http://www.jbox2d.org/v2demos/) is currently running circles around Blaze, performance wise.... I have a sneaking suspicion that this is the result of the many thousands of vector math operations that are performed each cycle during my stress test. Is there a way to force inline function calls? I'm compiling my code with '-release -O -inline', but this seems not to have much of an effect on performance. When I remove -inline there doesn't seem to be much of a difference in execution speed. FYI, I'm using DMD v1.035 on Windowd x32. Thanks, Mason
Feb 24 2009
Hi, I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip Cycle through (with arrows) and compare it to the Java pyramid stress test: http://www.jbox2d.org/v2demos/ Thanks for all the suggestions..... Although I may still take a stab a profiling to get even better performance! :-) Mason
Feb 25 2009
Mason Green wrote:Hi, I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip Cycle through (with arrows) and compare it to the Java pyramid stress test: http://www.jbox2d.org/v2demos/ Thanks for all the suggestions..... Although I may still take a stab a profiling to get even better performance! :-) MasonMaybe if you have spare time, you could write a blog post or article on performance gotchas you encounter while porting? -- Daniel
Feb 25 2009
Mason Green:I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zipWhy do you use lines with a thickness of 2? Antialiasing too may be good. Have you tried to compile it with LDC on Linux?Thanks for all the suggestions..... Although I may still take a stab a profiling to get even better performance! :-)Good :-) Bye, bearophile
Feb 25 2009