4 ms·
An alternative interpretation might be - JavaScript, the high level language language that's so awesome that it can out perform native code* * as long as you m
by phpnode 12y ago
An alternative interpretation might be - JavaScript, the high level language language that's so awesome that it can out perform native code*
* as long as you make it do less work
- VeejayRampay 12y agoWhy isn't the native version doing less work? Isn't that what you expect from a language design, that the native version will be as close to optimal as possible in the first place?
- kristiandupont 12y agoDid you read the article? These functions are not 100% equivalent.
- VeejayRampay 12y agoFair enough. Why doesn't the title of the post say so then? "Faster incomplete versions of Javascript native functions" would have been a better summary. Or even discuss the fact that if this library is good enough for people to use then maybe the edge cases that the native versions are covering might not be so useful after all?
- jdc0589 12y agoThe native versions have to/should 100% support the language spec and historical behavior. In this instance, it means they can't optimize much that iterates over a sparse array.