Live data from Hacker News

Bringing Asm.js to Chakra and Microsoft Edge

blogs.windows.com

81–88 of 88 posts

Re: Bringing Asm.js to Chakra and Microsoft Edge

#81
post #2

Come on Google! Support asm.js in Chrome.... Give up on Native Client.... Even Microsoft is doing Asm.js now....

I want less things emulated via Javascript and more stuff done directly via native code. Everything that is built on top of HTML/JS/CSS is basically a hack that is trying to emulate much better native platforms and it sucks. Why advocate to stay there? Let's go in the other direction in my opinion.

If you want to go native, then go native. If HTML/JS/CSS is a hack, then don't target the browser. It's that simple. Oh, you want to target the browser because it's ubiquitous? Well, that's because HTML/JS/CSS.

And on "emulating much better native platforms", well those native platforms are also trying (unsuccessfully) to emulate the web and the web is still winning.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#82
post #2

Come on Google! Support asm.js in Chrome.... Give up on Native Client.... Even Microsoft is doing Asm.js now....

Google has done a number of optimizations that enhance asm.js performance while not specifically targeting asm.js. This results in real time performance that sometimes beats Firefox, which has asm.js built in. While I would like to see more effort to the areas of asm.js that are slow, I can't discount the Chrome/v8 team's approach.

> This results in real time performance that sometimes beats Firefox

While Chrome's results have been impressive, in my experience Firefox does much better for Asm.js code - at least for the games I've been playing. So what benchmarks have you seen?

Also, Google not getting involved in asm.js to make it better, but developing and promoting PNaCL and Dart, well that to me just smells like Microsoft's lock-in tactics with IExplorer in the nineties.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#84
post #53

Earlier quoted context omitted.

Meanwhile, platforms that don't even try to wedge their technology into the HTML/CSS/JS universe have better applications.

In some ways they do, but they are also nonstandard, with the downsides that that brings. Neither overall approach is perfect, it's good that we have a combination of both in our field.

Why get hung up on the fact that something is non-standard? Things don't just pop into existence as a standard way of doing things. Some core group of people has to agree on them and then away we go - we have a standard!

That's why everybody should actively use non-standard things that they want to become standards.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#85

Earlier quoted context omitted.

I want less things emulated via Javascript and more stuff done directly via native code. Everything that is built on top of HTML/JS/CSS is basically a hack that is trying to emulate much better native platforms and it sucks. Why advocate to stay there? Let's go in the other direction in my opinion.

By native code do you mean assembly language? That would be very insecure and CPU-specific.

I think "Native to the underlying operating system" is what most people mean when they say native in this context.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#86
post #77

Earlier quoted context omitted.

People wanting high performance. For example, Grant Galitz's IodineGBA had some portions in asm.js https://github.com/taisel/IodineGBA

No, it doesn't. Where in IodineGBA do you see any hand-written asm.js code? Here's are some quotes from the author of that very library: "asm.js requires a style of coding only compilers can output. A person writing actual asm.js code by hand would need to be insane as asm.js code required style of coding is horribly disorganized"[1] "Unfortunately asm.js requires one giant array to put things on. No one in their rig…

That's from 2013. There have been more recent discussions.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#87
post #79
post #47

Earlier quoted context omitted.

> Actually, some people do [write asm.js code by hand] Who?

I did for my emulator jor1k. Take a look: https://github.com/s-macke/jor1k/blob/master/js/worker/or1k/... Handwritten asm.js code. Around 10 hours or porting time.

That's quite an impressive implementation! I didn't realize hand-written asm.js could be that readable.

Re: Bringing Asm.js to Chakra and Microsoft Edge

#88
post #87
post #79

Earlier quoted context omitted.

I did for my emulator jor1k. Take a look: https://github.com/s-macke/jor1k/blob/master/js/worker/or1k/... Handwritten asm.js code. Around 10 hours or porting time.

That's quite an impressive implementation! I didn't realize hand-written asm.js could be that readable.

Yes, more or less. Every operation must be written, that the type is obvious for the compiler. And you have one array, the heap with some special index rules. For example: (r[((ins >> 9) & 0x7C)>>2]|0 The >>2 and |0 is necessary.
Post reply on HN