News for hackers. Stuff that matters.
Re:AssemblyScript: A Subset of TypeScript That Compiles to W... by kannanvijayan on Wednesday September 06, 2017 @10:52PM (#15188835)
It's probably best to keep a Float64Array view into the ArrayBuffer around, and use that repeatedly instead of constructing a fresh one each time.

The interpreters and baseline JITs will always construct the object because they can't inline and they don't do whole-method analysis.. and the heavyweight JITs _probably would_ inline the constructor, then notice that the constructed array does not escape, then scalarize the whole thing down to a single read...

but hey, why work the optimizer so hard when you can just make life easy for it and do a single allocation up front, and it runs fast in all performance tiers, and performance isn't predicated on a particular optimization strategy being utilized.

Re:AssemblyScript: A Subset of TypeScript That Compiles to W... by trgv on Wednesday September 06, 2017 @11:52PM (#15189030)
Thanks for the advice, very helpful.