



River Trail — Intel's Parallel JavaScript 134
mikejuk writes "Intel has just announced River Trail, an extension of JavaScript that brings parallel programming into the browser. The code looks like JavaScript and it works with HTML5, including Canvas and WebGL, so 2D and 3D graphics are easy. A demo video shows an in-browser simulation going from 3 to 45 fps and using all eight cores of the processor. This is the sort of performance needed if 3D in-browser games are going to be practical. You can download River Trail as a Firefox add-on and start coding now. Who needs native code?"
Re:Superlinear speedup (Score:5, Informative)
If half the work is unparallelizable then the max theoretical speedup is 2x.
This is a simple application of Amdahl's law:
speedup = 1 / ( (1-P) + (P/S) )
where P is the amount of the workload that is parallelizable and S is the number of cores.
speedup = 1 / ( (1-0.5) + (0.5/S) )
lim S-> infinity (speedup) is 1/ 0.5 = 2x
The likely reason the speedup appears superlinear here is that there are actually two speedups.
1.) Speedup from parallelizing on multiple threads. From looking at the usage graphs, this is probably about 4x.
2.) Speedup from vectorizing to use processor AVX extensions: This could be another 4x.
Total speedup: 16x.
A 16x speedup is totally believable for vectorizing and parallelizing a simple scientific simulation like the one shown in the video.