4 ms·
1 + "0" > 9 in JavaScript, right? There are plenty of languages compile to JavaScript [1], maybe you can try some of them. [1] https://github.com/jashkenas/cof
by lifthrasiir 12y ago
1 + "0" > 9 in JavaScript, right? There are plenty of languages compile to JavaScript [1], maybe you can try some of them.
[1] https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js https://github.com/jashkenas/coffeescript/wiki/list-of-langu...
- jamii 12y agoUnfortunately most (all?) of them have performance costs and we are already eyeing up asm.js for better performance.
- kybernetikos 12y agoThere are iteration costs in that you're adding a compile step, but in terms of runtime performance, many of the languages are close enough to js that there shouldn't be any cost over hand written js (e.g. typescript, coffeescript,etc). In production you're probably running the whole thing through a minifier anyway, and the most popular of those can actually do performance enhancing transformations too. Google claim that compiled-to-js dart performs better than hand written js, although that is probably a mixture of exaggeration and the effect of the closure compiler which you can run on javascript code anyway.
- comex 12y agoTechnically he could have been referring to C, where it's also true that 1 + "0" > 9, albeit with a warning. ;)