4 ms·
That's not an objective comparison, since Javascript has been optimized to deal with arrays and numbers, as that's one main use-case that people have in the bro
by bad_user 12y ago
That's not an objective comparison, since Javascript has been optimized to deal with arrays and numbers, as that's one main use-case that people have in the browser. Take a look at the source code and tell me if that's the kind of code that you write.
- ChrisAntaki 12y ago> That's not an objective comparison, since Javascript has been optimized to deal with arrays and numbers What were your thoughts on the regex-dna benchmark?
- meowface 12y agoV8 is able to compile PCREs directly into efficient machine code (in some cases at least), CPython is not. See: http://blog.chromium.org/2009/02/irregexp-google-chromes-new-regexp.html http://blog.chromium.org/2009/02/irregexp-google-chromes-new...
- ChrisAntaki 12y agoThanks for the insight!
- deleted 12y ago[deleted]
- igouy 12y agoSo it's not an objective comparison because the V8 implementation performs well? :-)
- bad_user 12y agoNo, it's not an objective comparison because that's not the kind of code that we deal with in 90% of the cases, except when doing games, but then again plain Javascript is shitty for doing games, unless you develop in a strict subset that isn't meant for humans.
- igouy 12y agoEven if it were "not the kind of code that you deal with in 90% of the cases" that would not mean it "was not an objective comparison". It might mean it wasn't a relevant comparison for you; but if those 10% of cases were performance critical it would be very relevant.