News for hackers. Stuff that matters.
Re:How JavaScript works: inside the V8 engine by fenomas on Monday August 21, 2017 @09:52PM (#15069159)
Thanks for the details, very useful!

I don't suppose you know if similar things are true for Int arrays? I think I once had a similar case there, where I was doing integer operations on a large set of ints, and regular arrays were faster than Int32. But it's hard to imagine there as well what the slowdown would be.

Re:How JavaScript works: inside the V8 engine by zbjornson on Tuesday August 22, 2017 @12:31AM (#15069720)
Good question. I haven't looked at that case. V8 can detect and optimize small ints (smi, fit in uint32, i.e. all types of typedarrays), but it might still take the easy/slow path and convert to doubles. Relatively easy to look at with node.js and irhydra.