
Intel’s contributions in Microsoft Edge: SIMD and other performance enhancements - vezycash
http://blogs.windows.com/msedgedev/2015/05/21/intel-and-microsoft-partnering-for-an-improved-web-experience/
======
mmastrac
While this is interesting, what's the point of having a closed-source browser
in 2015? Is this really a competitive edge over everyone else?

Any of these interesting achievements are made somewhat ho-hum by the fact
that there's no way to see what happened.

~~~
melling
Microsoft IE has 55% market share. I'd never underestimate their ability to
leverage their position.

[http://venturebeat.com/2015/05/01/chrome-passes-25-market-
sh...](http://venturebeat.com/2015/05/01/chrome-passes-25-market-share-ie-and-
firefox-slip)

9 out of 10 desktop have run Windows for 2 decades.

~~~
ahoge
> _Microsoft IE has 55% market share._

Only according to Net Applications.

[http://en.wikipedia.org/wiki/Usage_share_of_web_browsers#Sum...](http://en.wikipedia.org/wiki/Usage_share_of_web_browsers#Summary_tables)

Chrome is the #1 everywhere else.

~~~
kuma4
Statcounter is unreliable. IE is by far the #1 on PCs. Chrome is #1 on mobile
devices.

~~~
ahoge
> _Statcounter is unreliable._

StatCounter's stats are very similar to Wikimedia's though. Net Applications
is the outlier.

I've only seen IE in the #1 position in the stats of corporate extranet
applications.

For all the regular websites it's generally Chrome and IE is either in 2nd or
3rd place. Firefox is kinda popular here, you see.

"Unreliable" is a pretty odd word choice, by the way. Global stats are always
different from your own stats. By catering to a particular demographic you're
inevitably introducing a massive bias.

Naturally, the only thing that matters are your own stats for a particular
website. If it's 95% IE8 then that's how things are. IE8 has to work
perfectly. There is no way around it.

------
rbanffy
Does Intel have the same kind of cooperation with the WebKit and Mozilla
projects?

~~~
cwyers
I don't know about Webkit, but they've announced partnerships with Mozilla and
Google (Blink) about SIMD:

[https://01.org/blogs/tlcounts/2014/bringing-simd-
javascript](https://01.org/blogs/tlcounts/2014/bringing-simd-javascript)

~~~
azakai
Yes, Intel has been doing amazing work here, both on the spec and on writing
code for multiple browsers. Really helping to push the entire industry forward
on SIMD for the web.

------
TheLoneWolfling
A tangential question:

Why are SIMD instructions fixed-number-of-lanes? It seems to me that something
like a semi-generic MAP_START(start, number, stride) <bunch of instructions>
MAP_END (where it's explicitly executing the instructions in an undefined
order between lanes) would be easier to deal with, and easier to upgrade down
the line too.

~~~
sunfish
In part because if <bunch of instructions> is arbitrary JS, it may or may not
be able to run in SIMD mode, so then you get surprising performance cliffs
because your code runs in scalar sometimes.

And in part because there's more to "short SIMD" programming than just
charging through large arrays. Sometimes you need to swizzle elements around,
for example, and this is easier if you can think about multiple lanes at a
time.

~~~
TheLoneWolfling
Not arbitrary JS. Semi-arbitrary machine code. The first few CPUs would
restrict it to a couple instructions, with later generations potentially
adding instructions.

And as for your second, don't think of it as a standard map. I should have
elaborated. Think of it more of a for loop with an index variable and
temporary variable per-iteration. You can access (read and write) other things
outside of that index too - the only restriction being that the iterations of
the loop will execute in an arbitrary order, including simultaneously.

~~~
corysama
I think what you are looking for is
[https://github.com/IntelLabs/RiverTrail](https://github.com/IntelLabs/RiverTrail)

The JS SIMD effort is aimed at finer-grained, hand-written but highly reliable
and predictable SIMD as compared to the large-scale, convenient but kinda
magic of RiverTrail.

~~~
TheLoneWolfling
I think you missed the start of my first comment: namely, _I was not talking
about JS_. I was talking about SIMD at the instruction-set level in general.

~~~
lmeyerov
Adding fuel to your fire: hardware will often be implemented with multiple
SIMD compute units (transistors are cheap!), and pipeline multiple SIMD calls.
With instruction sets like AVX, the length is increasing.

SIMD is non-controversial: it's just like another ALU instruction but maps the
inputs to the outputs differently. Doing something more exotic, like VLIW, is
an uphill battle. However, as seen with GPUs, that can be fruitful.

------
EugeneOZ
Good to see progress in this field. Also want to remind that you can use SIMD
in Dart already now:
[https://www.dartlang.org/articles/simd/](https://www.dartlang.org/articles/simd/)

~~~
pjmlp
In which browser?

~~~
thomasfoster96
None, until SIMD appears in JavaScript.

~~~
pjmlp
Which was the whole point of my question.

Dart has become just another language that transpiles to JavaScript, abandoned
even by Googlers.

~~~
EugeneOZ
Google use it for the most mission-critical part of their business, I'm not
sure it means "abandoned". [http://news.dartlang.org/2015/03/dart-for-entire-
web.html](http://news.dartlang.org/2015/03/dart-for-entire-web.html)

And more: [https://www.dartlang.org/community/who-uses-
dart.html](https://www.dartlang.org/community/who-uses-dart.html)

~~~
pjmlp
That is not the image the Angular team has shown to the world.

What is the business value to use Dart instead of any other language that
transpiles into JavaScript?

~~~
EugeneOZ
Angular 2 exists in 3 forms: TypeScript, Dart and ES5. And a lot of ideas came
to ng2 from AngularDart.

> What is the business value to use Dart instead of any other language that
> transpiles into JavaScript?

It's the question of preferences. Dart gives great tooling (IDE, debugging,
testing) and more advantaged language, but universe of Dart is much smaller,
so there are pros and cons, as always. There is no one ideal size of shoes.

------
frozenport
Is this a strawman?

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?

~~~
mkishi
They list Intel's contribution extensively in the post. I'm not sure why you'd
assume they are trying to deceive anyone.

> 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](https://github.com/johnmccutchan/ecmascript_simd)
[2]: [https://github.com/tc39/ecma262](https://github.com/tc39/ecma262)

------
_pmf_
This could be a breath of fresh air into the browser game. Since Opera has
effectively stopped innovating, there's nothing Chrome and Mozilla can rip
off.

~~~
acqq
The Asm.js feature described in the article, a precondition for SIMD support
to matter was actually invented in Mozilla. As far as I know they were also
the first with SIMD in browser, helped by Intel.

~~~
acqq
And apparently explicit SIMD approach was initiated by John McCutchan from
Google's Dart team.

