Re:How We Bypassed Safari 17's Advanced Audio Fingerprinting...
by jsheard on Saturday March 09, 2024 @07:45PM
(#39655853)
IIRC it turned out that way in large part because realtime audio is very sensitive to performance hitches, and idiomatic JS is hitchy by nature due to relying on garbage collection, so they wanted to hoist as much as possible up into native code provided by the browser. If WASM had existed at the time it would have been easier to make the case for just exposing a simple raw audio interface instead.
[ Parent
| on HN ]
Re:How We Bypassed Safari 17's Advanced Audio Fingerprinting...
by capitainenemo on Saturday March 09, 2024 @09:46PM
(#39656346)
Well... Mozilla had ASM.js at the time. In part to showcase their superior performance with certain portions of JS compared to V8 - at the time I remember the things like console emulators preferring Mozilla's JS engine due to it offering more reliable performance than V8 on the tight loops and large switches. Mozilla was also demonstrating how their engine could offer comparable performance to Google NaCl in an image processing demo which was conceived to show how NaCL could cover limitations in V8 at the time.
I wonder if we might well have had more traction with Mozilla's approach and ASM.js if V8 had had similar features.
Oh well. Is what it is, and Mozilla (and Microsoft and Apple) did at least manage to get WASM which has been super useful even outside of browsers.
Re:How We Bypassed Safari 17's Advanced Audio Fingerprinting...
by capitainenemo on Sunday March 10, 2024 @12:18PM
(#39660327)
(That is, I'm pretty sure ASM.js uses same trick WASM does given it was the predecessor - just preallocate a ton of memory in an array, and work with primitive types, and no GC to worry about most of the time)