electricessence / TypeScript.NET

A JavaScript-Friendly .NET Based TypeScript Library (Moved)
https://github.com/electricessence/TypeScript.NET-Core
Other
251 stars 36 forks source link

Performance #9

Closed xgrommx closed 9 years ago

xgrommx commented 9 years ago

Hi @electricessence. I just created some performance test and it's awsome! You can look on this http://jsperf.com/lodash-lazy-lx/4

xgrommx commented 9 years ago

Sorry, I forgot apply toArray. Now looks like that lodash has a higher speed.

electricessence commented 9 years ago

Aww man. I tried your tests. I think the reference scripts are bogus now. Can you check?

electricessence commented 9 years ago

LOL. Yeah without toArray, or a .forEach execution, it just builds the query. ;) Nice try. :) It will end up being same performance trade offs that you see with LINQ in C#. It has some serious benefits because you only get what you need, but you simply can't beat a straight forward for loop that the compiler can optimize.

If you haven't already seen these: http://jsperf.com/browse/electricessence