[llvm-dev] Improve the performance of JamCRC (original) (raw)

Scott Smith via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 12 20:49:02 PDT 2017


Lldb relies heavily on crc when loading shared libraries. The existing implementation is quite slow as it computes a byte at a time, creating a long dependency chain.

Unfortunately the polynomial is not the same as the one implemented by x86 processors in SSE 4.2, but there's another way to make it faster by using more lookup tables.

Zlib implements this, but rather than require zlib, I instead added the relevant code to compute four bytes at a time in parallel.

A separate patch changes lldb to rely on JamCRC instead of its own implementation. This patch improves the performance, which brings my test (starting lldb, breaking at main) from 47 seconds down to 36 seconds. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170412/c6d1ef7d/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: jamcrc.patch Type: application/octet-stream Size: 16782 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170412/c6d1ef7d/attachment.obj>



More information about the llvm-dev mailing list