thanhhovn / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Typed array support from C# int, float, and double arrays #291

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be useful for performance to generate typed arrays from C# arrays. 
There are some micro-benchmarks showing moderate improvements on operators, and 
larger ones for creation

http://jsperf.com/typed-arrays-vs-arrays/7

I've found even larger performance improvements on some full systems where 
presumably the JIT is failing to optimise JavaScript arrays.

In terms of compatibility typed arrays seem like a closer match C# arrays i.e. 
fixed size and initialized.

They might need to go behind feature detection e.g. the approach taken by 
http://glmatrix.net/

Original issue reported on code.google.com by co...@gravill.com on 3 May 2013 at 1:09