Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You seem to be very hung up on surface syntax. The importance of a VM is not the syntax of its language but the semantics.

I'm protesting that there is a syntax to this 'VM'. It's rather indicative of Mozilla's approach to life, namely, write everything in JS out of some pseudomasochistic desire for backward compatibility hacks.

I would really, really like to see some benchmarks comparing NaCL vs asm.js, and I won't buy this as a viable compilation target until there's data to back up these (dubious) claims. If they do, then perhaps a frontend would be useful.

> The importance of a VM is not the syntax of its language but the semantics.

The semantics of JS are pretty horrible too.

In short, what appears to be Mozilla's idea for the future: http://i.imgur.com/B5KRsHI.jpg



> I'm protesting that there is a syntax to this 'VM'.

That isn't a very reasonable thing to protest. Every language has a syntax. That includes every ASM variant. Syntax is an inherent aspect of language. What it sounds like you're actually offended by is that its syntax is very different from most ASM syntaxes.

> The semantics of JS are pretty horrible too.

Are you talking about asm.js, or are you talking about the superset that is not relevant to this discussion?


> I would really, really like to see some benchmarks comparing NaCL vs asm.js, and I won't buy this as a viable compilation target until there's data to back up these (dubious) claims.

The current numbers are that asm.js is around 2x slower than native code. I didn't compare to NaCl (which would be apples-to-oranges since it is non-portable) nor PNaCl (which I am not sure is ready yet for benchmarking? Please correct me if not).

We expect to improve on the 2x later this year, this is just the first iteration. I do think 2x is quite promising already though - it's in the range of Java and C# (on a fast VM for them).

I'll be putting up some slides with more specific numbers tomorrow after I finish giving a talk on it.



> It's rather indicative of Mozilla's approach to life, namely, write everything in JS out of some pseudomasochistic desire for backward compatibility hacks.

I'm just trying to make progress in a messy world. JS is not my ideal programming language (even though I've worked hard to make it better 7 years now (!) and counting). I simply believe asm.js has a good adoption/evolution story, and I want to web to continue growing and competing.

> The semantics of JS are pretty horrible too.

A cheap shot, and missing the point. The subset of JS, while being completely equivalent to JS semantics, is also equivalent to a low-level machine model. IOW, it gives you the semantics of a low-level but safe VM.


Thanks for working so long on making things better. I think asm.js is going to be really great.


this http://blog.j15r.com/blog/2011/12/15/Box2D_as_a_Measure_of_R... is a bit old, but it suggests that NaCL is pretty close to native (only 20-30% slower) and jre is 2-3 times slower.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: