4 ms·
postMessage uses it transparently: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage https://developer.mozilla.org/en-US/docs/Web/API/Worker/p
by zamalek 1y ago
postMessage uses it transparently: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage https://developer.mozilla.org/en-US/docs/Web/API/Worker/post...
- hinkley 1y agoSo I wonder if any of these improvements could be applied to structuredClone. Benchmarks aren’t showing structuredClone favorably versus JSON round tripping. Likely because JSON-compatible data structures are less complex than clonable data. I suspect with this change JSON will now be faster than structuredClone.
- zamalek 1y ago> Benchmarks aren’t showing structuredClone favorably versus JSON round tripping. Which ones? Structured clone seems to be approximately the same as FF according to this (structuredClone is slightly faster on my machine, probably margin of error): https://measurethat.net/Benchmarks/Show/23052/0/structuredclone-vs-jsonparse-jsonstringify https://measurethat.net/Benchmarks/Show/23052/0/structuredcl... (Linux: FF 141, Chromium 138).
- hinkley 1y agoSo think about how that graph is going to look once the stringify part is twice as fast. Instead of being slightly faster it'll be statistically slower.