I expect that every browser implicitly uses SIMD by way of the compiler identifying and inserting the correct instructions (MMX, AVX2...), what exactly is Intel's contribution in this, did they manually vectorized some tight loop?
I expect that every browser implicitly uses SIMD by way of the compiler identifying and inserting the correct instructions (MMX, AVX2...), what exactly is Intel's contribution in this, did they manually vectorized some tight loop?
> Intel has been contributing to Chakra, the JavaScript engine for Microsoft Edge
> Some examples of Intel’s direct contributions to Chakra’s JIT compiler include better instruction selection and scheduling.
> [they] also helped us identify opportunities of missed redundant instruction elimination, and inline overhead reduction.
> Intel engineers are collaborating with us closely to implement Single Instruction Multiple Data (SIMD) [1], a future ECMAScript proposal, in Chakra
> Intel recently contributed an optimization to improve navigation (load) time for pages containing several inline elements, optimizations to reduce DOM parse times for text-area elements, and participated in investigations and root cause analysis to improve page load/response times
[1]: https://github.com/johnmccutchan/ecmascript_simd [2]: https://github.com/tc39/ecma262
https://developer.mozilla.org/en-US/docs/Web/JavaScript/SIMD...
var a = SIMD.float32x4(1, 2, 3, 4);
var b = SIMD.float32x4(5, 6, 7, 8);
var c = SIMD.float32x4.add(a,b);
The benefit of such instructions is that they are fully typed and can easily map directly to the machine instructions. And of course, you don't have to write such code unless you actually program something that calculates a lot.It is a Google/Mozilla/Intel collaboration, started 2013:
https://www.youtube.com/watch?v=CbMXkbqQBcQ
The initial proposal was by John McCutchan, who works in the Google's Dart team but the paper
http://dl.acm.org/citation.cfm?id=2568066
is already signed by people from Google, Intel and Mozilla and Intel obviously actively works with the browser vendors.
"This paper introduces an explicit SIMD programming model for Dart and JavaScript, we show that it can be compiled to efficient x86/SSE or ARM/Neon code by both Dart and JavaScript virtual machines achieving a 300%-600% speed increase across a variety of benchmarks. The result of this work is that more sophisticated and performant applications can be built to run in web browsers. The ideas introduced in this paper can also be used in other dynamically typed scripting languages to provide a similarly performant interface to SIMD co-processors."
What I don't know is if Intel keeps some patents or some sources. That could explain that Intel must be involved. But maybe they simply like to be involved.