3 ms·
I also hoped to see a bigger improvement, but it turned out that Javascript is already very fast for nbody. Maybe I should have picked a well known numeric benc
by krausest 10y ago
I also hoped to see a bigger improvement, but it turned out that Javascript is already very fast for nbody.
Maybe I should have picked a well known numeric benchmark where Javascript is still far behind - any suggestions for that? Or are the Javascript VMs already too good for numeric benchmarks?
- hrjet 10y agoYou can try increasing `N` in the nbody problem, and also measuring the memory overhead. You could also try one of the hashing / crypto algorithms in JS. They should involve a lot of integer arithmetic that should make WebAssembly stand out. More tips: * for performance measurement, setup the benchmark so that JS run takes atleast 30 seconds. (Increase N, etc) * close all other applications and tabs * If you have linux, set the CPU governor to performance * Measure the CPU temperature and make sure you let the CPU cool down between runs. In modern CPUs, the cores get throttled automatically when they reach a certain temperature.