4 ms·
The "significantly faster" is your answer. A 10 second visit on JS vs PNaCl is a whole new game. Edit: to elaborate: do a simple simulated annealing on a 200x2
by jmpe 13y ago
The "significantly faster" is your answer. A 10 second visit on JS vs PNaCl is a whole new game.
Edit: to elaborate: do a simple simulated annealing on a 200x200 array in JS - it's measured in seconds on my laptop. I wrote a program in JS that did this (image segmentation, fg/bg seperation for recognition) and abandoned it because of speed issues.
- azakai 13y agoJS should not be that slow in my experience. Do you still have the code to your benchmark somewhere? Perhaps you ran into a performance bug that we can file for the relevant browser(s).
- jmpe 13y agoI have it somewhere, also still have that laptop. It wasn't a benchmark but a poc for an algorithm. I did some serious optimization when I wrote it. There was a "best practices" for V8 that shedded some light on the background of JS variable allocation, I followed it and got a serious boost. Also did lookup tables instead of runtime math with exp/log functions. But in the end: hit several worst case images that took more than 12s, which was a gap that couldn't further be reduced through optimization. But you're absolutely right, I should redo it in PNaCl.
- eliben 13y agoAs azakai said, real benchmarks run by 3rd parties are great and very welcome. They can go a far way for improving all involved platforms and thus the web in general.
- jmpe 13y agoI'll allocate some time for it. Where should I submit?