6 ms·
It is. Sounds like a big waste of performance to me.
by tsahyt 14y ago
It is. Sounds like a big waste of performance to me.
- robhawkes 14y agoYou'd be surprised at how well JavaScript performs when allowed.
- tsahyt 14y agoProbably. I haven't witnessed that yet though.
- praptak 14y agoThe scary part of JavaScript is not performance, it is the hell of inconsistency. '1' - 0 is 1. Guess what '1' + 0 is? Nope, it's '10'. Crockford's JavaScript truth table is mind-bending. On top of that, semicolon insertion.
- ajanuary 14y agoType coercion and asi are probably the least troublesome odd parts of js I encounter day to day. I find the weird scoping rules around 'this' and the verbosity of anonymous functions far worse. [1] (Sincerely and non-rhetorically) Do you really find the former more annoying than the latter? I see a lot of people using those examples to call out JS inappropriateness for development, but it seems like they're focusing on the wrong things to me. [1] I know they can be fixed by using a language that compiles down to JS. So can the parent's criticisms.
- scriptproof 14y agoNot inconsistency to me. + is a string concatenation operator, - is not (maybe it could be) and '1' - 0 is just a fallback.
- MatthewPhillips 14y agoNot really scary day-to-day. If you want to do integer math, make sure you're dealing with integers.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- pkolaczk 14y agoIt performs well, until the code is too complex for the JIT compiler to get type inference / speculative optimizations right. Then it suddenly performs very, very poor, because it falls back on dynamic (very slow compared to inline) dispatch and doubles instead of ints.
- guilloche 14y agoThe language seems in need of refinement to get significant performance in match of JVM JIT, not to mention c.