Files
Snappy/snappy.cc
Connal de Souza 2ac1356d4d Optimize ExtractOffset() by avoiding storing the mask.
Currently, the constant mask is stored to memory and then immediately read back. Since the read address is often not aligned to the store address, this can cause an expensive Read-after-Write hazard. Although the load is contained entirely within the store, meaning that store forwarding can occur and there are no throughput penalties, there is still a latency penalty. The increased latency matters because of the pointer-chasing pattern in decompression here.

https://godbolt.org/z/e71jhE3bj

PiperOrigin-RevId: 626440765
2026-05-09 18:52:39 +00:00

97 KiB