If webrender is still serialization bottlenecked, it may be a low hanging fruit to fixe this issue: https://github.com/serde-rs/json/issues/120
A naive loop SIMD implementation 16 byte aligned showed a 5x performance improvement in the microbenchmark!
It has not been merged since at the time SIMD wasn't stable on rust at the time.
(Btw more SIMD utilisation in Firefox could yield great performance gains (and it can be multithreaded to have best of both worlds MIMD))
WebRender currently uses bincode instead of json for serialization. It's not obvious to me how we could use SIMD to speed up bincode serialization.
I put up a branch here https://github.com/jrmuizel/webrender/tree/bincode-max that should improve serialization and, even more so, deserialization speed by statically estimating the size of a display item.
Most helpful comment
I put up a branch here https://github.com/jrmuizel/webrender/tree/bincode-max that should improve serialization and, even more so, deserialization speed by statically estimating the size of a display item.