agentx Posted June 24, 2014 Report Share Posted June 24, 2014 There are currently two interesting debates going on at HackerNews about JS libs providing functions faster than native JS functions. The trick is to not implement all edge cases the standard expects. E. g. if you loop over an array and know it has no holes you can drop that check. Now at http://jsperf.com/fast-vs-lodash a test case appeared showing fast.js vs. lowdash.js vs. native giving me very mixed results with FF 29 and FF later.A few of the test cases shouldn't be used at all if one wants to go very fast, like forEach vs a simple while loop. But on the other hand fast.js has an indexOf which is surprisingly 15 times faster than the native. Since I tend to implement number crunching parts of a program in small, optimized and inline-able functions, I found some results an eye-opener. And it made clear the JS pathfinder has room for optimizations.Yves, if you read this, it might be a good idea to stick a while longer with SM29. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.