Skip to content
Unverified Commit 37048d04 authored by serge-sans-paille's avatar serge-sans-paille
Browse files

Cache memory buffer's name length

This avoids repeated calls to strlen while we already know its value.

When preprocessing sqlite3.c, this gives a surprising 2% speedup.

Full benchmark available here:

https://llvm-compile-time-tracker.com/compare.php?from=d14c2d408dccd8c6defa7d151e9a96be3cac8cc3&to=04f0641c1cbdcd0bdbd11cd910ca6091420bf52e&stat=instructions:u

Recommit 18244321, with restored '\0' at the end of buffer name.

Differential Revision: https://reviews.llvm.org/D138555
parent 5cb68314
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment