Live data from Hacker News

Microsoft Edge's JavaScript engine to go open-source

blogs.windows.com

31–40 of 283 posts

Re: Microsoft Edge's JavaScript engine to go open-source

#31

Earlier quoted context omitted.

I'm not sure where the hangup is, but I've found that Edge is fast as hell for initial page startup, but lags behind quite a lot when under heavy load. I've seen the benchmarks but in my experience it just... lags... For example, on the kangax ES6 compatibility table [1]. On chrome clicking a column takes less than a second, on Edge (i'm on an up-to-date Windows 10 machine, no preview stuff) it loads faster than in c…

I know between Chrome and Firefox for a particular project of mine (which is a bit old now), Firefox ran raw JS faster, but Chrome could update its DOM faster. FF would spend much more time when many updates needed to happen in a large column of divs (10k+). Raw JS speed isn't everything.

I get that, the Kangax table was just an example I literally ran into moments before.

But for a more "pure" js example, I have an app which does some image processing in the browser using the canvas ImageData stuff and typed arrays.

For whatever reason my test case completes in about 3 seconds in chrome, 3 to 4 seconds in FF, 11 seconds in IE11, and 6 seconds in Edge.

I've profiled the hell out of it and i just can't figure out the reasoning for it, but it's there. (and as a side note, having the dev tools open in Edge obliterates javascript performance, my test case was taking 30+ seconds to run when i had the dev tools open and it took me longer than i'd like to admit to figure that one out)

I have a feeling the problem is that i'm optimizing for V8 because i know it the best, and i'd much rather not do that if possible.

Re: Microsoft Edge's JavaScript engine to go open-source

#32
post #11

Earlier quoted context omitted.

Servo is a rendering engine written in Rust, why would it choose Chakra, which is written in C++, over WebKit, which is written in C++?

Servo is use in production by any browser? or any Project like Chakra? or is just an experiment till now?

Not yet. I don't think it's an experiment and they are intending to actually use it at some point, but it is still in development right now

Re: Microsoft Edge's JavaScript engine to go open-source

#33
post #19

Wait, Edge does better on ES6 coverage than both Chrome and Firefox? Microsoft have seriously stepped up their game, especially seeing as it's now neck and neck for performance with Chrome: http://venturebeat.com/2015/09/10/browser-benchmark-battle-s...

No wonder: Microsoft needs "class" syntax in JS, they are a driving for behind TypeScript and ES6. Especially interesting, as Javascript has prototype inheritance. The reason: All of MS code is class-based, and they want it to look similar to C#.

Re: Microsoft Edge's JavaScript engine to go open-source

#35

As a mere mortal - How hard would it be for a day programmer to built something cool like an JavaScript engine ? I sometimes have crazy thoughts about the world ending. How hard would it be to built your own javascript engine from scratch ?

BeRo did build a javascript engine from scratch on his own: https://github.com/BeRo1985/besen

From the copyright headers he worked on it starting in 2009 and had the first public release in 2014 (actually 2010, see comment below). He certainly worked on other stuff in between too. This is also not a toy implementation. While I have no idea how it compares to state of the art engines, it does feature a whole bunch of optimizations and a JIT compiler.

Re: Microsoft Edge's JavaScript engine to go open-source

#36

I'd like to see Node.js using Chkara by default, V8 developers have showed that they don't care much about Node.js, they are more interested in Chrome, and MS have showed more interest in Node.js than Google and I'm sure it will be better for all, fingers crossed.

I don't. A lot of code out in the wild already relies on v8, and won't work with Chkara. Node 5 is up-to-date with v8. Though, I would like to see Mozilla devsvwpuld revives the unofficial spidermonkey Node.js support (https://news.ycombinator.com/item?id=2469786 , https://github.com/zpao/spidernode ).

Re: Microsoft Edge's JavaScript engine to go open-source

#37
post #27
post #10

I have a somewhat off topic question: is there anything in the design of Javascript that mandates single-threadedness? Could any Javascript engine implement threads? I'm asking because I'm wondering if Node.js's evented approach is the only way to do things.

If you allow threads to share memory arbitrarily you need to add locking to all internal VM structures, which is going to be a significant slowdown. Also it's not (any longer) considered good practice to have languages that allow mutable memory sharing since that makes software unreliable, so it's not really a good idea. Without arbitrary memory sharing, multi-threading is already supported with web workers.

Sharing only typed arrays shouldn't be hard.

Re: Microsoft Edge's JavaScript engine to go open-source

#38
post #19

Wait, Edge does better on ES6 coverage than both Chrome and Firefox? Microsoft have seriously stepped up their game, especially seeing as it's now neck and neck for performance with Chrome: http://venturebeat.com/2015/09/10/browser-benchmark-battle-s...

Yep. They're kicking everyone's asses in ES6 feature coverage. All the more impressive when you consider how they came from behind. http://kangax.github.io/compat-table/es6/

I's almost sad that Edge is not cross-platform.

Re: Microsoft Edge's JavaScript engine to go open-source

#39

Wow, I'll admit that I haven't been looking at Edge simply because of the IE stigma, but this blog post impressed me. 90% ES6 support? More so than Babel? Awesome. And it's getting open sourced! I hope to see it ported to the Unixes. Perhaps Servo+Chakra could be a thing?

Initially I thought Edge would just be IE with (yet another) skin, but I have to say, it's absurdly fast and lightweight. It's still not my main browser as I'm now too deeply entrenched in Chrome for development, but it makes me really happy to know they're actually pushing the web ahead.
Post reply on HN