I ran his tests for my desktop PC, using the "1000 particle" mode:
- Chrome 5 runs this Canvas test at about 30FPS. (Yes, it's faster than IE9.)
- The Flash version runs about 42FPS.
So just for kicks, I coded up a native windows particle system just to compare. (It's quite safe to try, if you have Windows.)
My code runs about 350FPS on the same test.
This is not a GPU-based app. It doesn't even use DirectDraw. It doesn't use SIMD. It's just a 32-bit bitmap that I draw stuff to, in a loop.
But overall, I don't know why we're not paying attention to pixel-bound inner loops in the browsers, like people have for years in native code. There's apparently a lot of room for improvement.
Have you tried testing HTML5 on Safari? Or seen the demos on apple's site. They seemed awful Safari-specific but they were rock solid (easily 60fps) on my piddly 13" macbook pro. Very iPad-like. Chrome in comparison was chugging.ReplyDelete
More for an apples-to-apples comparison, you might wish to try porting your C++ code to http://code.google.com/p/nativeclient/. I'm also interested in what the WebGL performance would be running in hardware with the animations handled by shaders.ReplyDelete
@steve - Safari is not faster, at least for these tests. Not sure why.ReplyDelete
The reason Chrome is slow on the IE9 bitmap tests is due to its high-quality resampling...they have put in a patch to allow animated bitmaps to draw with bilinear: https://bugs.webkit.org/attachment.cgi?id=57332&action=editReplyDelete
I wonder how fast their software bilinear is :)
However, regarding the original post, the particle test is just vectors, so it shouldn't matter so much.
sort of blends rendering and "business logic" though, no? wouldn't it be interesting to connect v8 or tamarin to you compositor? (but yeah, I agree :))ReplyDelete
I downloaded and ran your desktop version of the particle simulation, and it does indeed give a very high frame rate.
What language did you use to make the exe? Would you mind sharing the source code?
I took the plunge and downloaded your dekstop particle app - amazing how much faster it runs than anything browser based.
May I ask what language your desktop animation is coded in? And would you be willing to share it? I always think a particle animation is a great way to try and learn a new language. Perhaps I have never learnt any languages outside of the browser.
Hi Gabber - the code is my own framework, used in a bunch of large applications, so it's not publicly available.ReplyDelete
However, you may be able to adapt blttest (http://stereopsis.com/blttest/) to do something similar.