Re:TypeScript: a language for application-scale JavaScript d...
by wingspan on Monday October 01, 2012 @02:27PM
(#4598566)
I tried to get around this by creating overloads of almost all methods when you are operating on an array. `each` for instance, has a standard implementation using moveNext, and then an array implementation using a fast for loop. In some cases you could even drop down to native function calls.
Re:TypeScript: a language for application-scale JavaScript d...
by sciolistse on Monday October 01, 2012 @02:45PM
(#4598655)
Sounds reasonable. Could be better timing now as well, what with server-side javascript having become popular. Good luck with the library!
The problem i had was that the native array methods are rather fast while function calls (for moveNext) are quite slow, so i couldn't get a whole lot of speed out of it.
Newer javascript engines might be sufficient to offset that though.