You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[llvm][mustache] Optimize accessor splitting with a single pass
The splitMustacheString function previously used a loop of
StringRef::split and StringRef::trim. This was inefficient as
it scanned each segment of the accessor string multiple times.
This change introduces a custom splitAndTrim function that
performs both operations in a single pass over the string,
reducing redundant work and improving performance, most notably
in the number of CPU cycles executed.
Metric | Baseline | Optimized | Change
-------------- | -------- | --------- | -------
Time (ms) | 35.57 | 35.36 | -0.59%
Cycles | 34.91M | 34.26M | -1.86%
Instructions | 85.54M | 85.24M | -0.35%
Branch Misses | 111.9K | 112.2K | +0.27%
Cache Misses | 242.1K | 239.9K | -0.91%
0 commit comments