3 ms·
It may not work in Firefox due to the restricted resolution of performance.now() there; per the demo page, that is 5μs in desktop Chrome - Firefox meanwhile rou
by throwanem 6y ago
It may not work in Firefox due to the restricted resolution of performance.now() there; per the demo page, that is 5μs in desktop Chrome - Firefox meanwhile rounds to the nearest millisecond, per https://developer.mozilla.org/en-US/docs/Web/API/Performance/now https://developer.mozilla.org/en-US/docs/Web/API/Performance....
That said, the demo also mentions a paper [1] on high-resolution timing channels available in Javascript without needing to rely on the performance API. I don't know how well a Spectre attack relying on such a timing method would fare in any browser.
Looking at that paper's abstract and code samples, I think most if not all of the timing channels it describes rely entirely on tight loops, so one or more of them being attempted would explain the high CPU usage you noticed.
[1] https://pure.tugraz.at/ws/portalfiles/portal/17611474/fantastictimers.pdf https://pure.tugraz.at/ws/portalfiles/portal/17611474/fantas...
- lights0123 6y agoNow of course if they enabled COOP/COEP like their own guide recommends[1], that woukd be different. [1]: https://web.dev/coop-coep/ https://web.dev/coop-coep/