sq / JSIL

CIL to Javascript Compiler
http://jsil.org/
Other
1.73k stars 240 forks source link

Method invocation performance improvements #978

Open iskiselev opened 8 years ago

iskiselev commented 8 years ago

Here I want to gather list of task that could be done for method invocation performance improvements, test results and ideas.

iskiselev commented 8 years ago

arguments.length extremely slow under Chakra (IE/Edge). We should use signatures with all generic methods and methods that differs in arguments count.

kg commented 8 years ago

That's unfortunate. Have you filed a bug? Tons of production software requires on it being fast to check arguments.length.

iskiselev commented 8 years ago

Microsoft/ChakraCore#1083

iskiselev commented 8 years ago

I don't know, but looks there is something else. My test on JSIL overload dispatch (based on arg number): Chrome: ~315ms Firefox: ~175ms Edge: ~13500ms

Call through qualified signature: Chrome: ~290ms Firefox: ~185ms Edge: ~360ms

Based on my simple test in Microsoft/ChakraCore#1083 I could expect 2-5 slower than Chrome. Actually Edge is 80 times slower!