News for hackers. Stuff that matters.
Re:WebAssembly Raytracer by jandem on Saturday December 16, 2017 @01:58PM (#15941151)
The JS version is slow in Firefox because of a silly perf cliff, I filed a bug [0]. A quick fix for that improves the JS version from ~400 ms to ~180 ms for me locally. ~140 ms if I disable the Nightly-only GC poisoning.

edit: the JS code is a bit buggy: it does |if (Math.abs(dblDiscriminant) < 0.01)| in the |intersection| function, but dblDiscriminant is a var set in the next loop! Math.abs(undefined) is something we can easily optimize in the JIT, but really the JS code is broken. Folding this in our JIT [1] improves this to < 130 ms for me.

Please let us know if you run into JS perf problems, these bugs are usually easy to fix.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1425687

[1] https://pastebin.com/CzfP5vQj

Re:WebAssembly Raytracer by sniklaus on Saturday December 16, 2017 @04:02PM (#15942078)
Thank you for your evaluation! It should have been dblDenominator instead of dblDiscriminant and I fixed it accordingly. However, this change does not seem to significantly affect performance.