3 ms·
Right, but your example here is a particularly skewed one. It's a hashing library. All it does is take integers and do arithmetic on them. Most real-world appli
by munificent 14y ago
Right, but your example here is a particularly skewed one. It's a hashing library. All it does is take integers and do arithmetic on them. Most real-world application code is not at all like that. Asm.js doesn't even support strings as far as I know.
- acqq 14y agoAsm.js is exactly made for things like that: the pieces of code that don't depend on "strings" but calculate a lot. And for things like this: http://bellard.org/jslinux/ http://bellard.org/jslinux/ For "strings" the existing JITers do already the good job. You can just use JavaScript as is then.
- munificent 14y agoYes, agreed. asm.js is a great fit here. My point was that that fact doesn't generalize well to other problem areas. Earlier you said asm.js isn't just a compiler target, but if your program uses strings, or objects, or closures, or GC, then it's not going to be a good fit to use asm.js.