1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-03-17 20:28:03 +02:00
Andrew Gallant 1659fb9b43 printer: hand-roll decimal formatting
It seems like a trifle, but if the match frequency is high enough, the
allocation+formatting of line numbers (and columns and byte offsets)
starts to matter. We squash that part of the profile in this commit by
doing our own decimal formatting. I speculate that we get a speed-up
from this by avoiding the formatting machinery and also a possible
allocation.

An alternative would be to use the `itoa` crate, and it is indeed
marginally faster in ad hoc benchmarks, but I'm satisfied enough with
this solution.
2023-10-09 20:29:52 -04:00
..
2023-10-09 20:29:52 -04:00
2023-10-09 20:29:52 -04:00
2023-09-25 14:39:54 -04:00
2023-10-09 20:29:52 -04:00
2023-09-25 14:39:54 -04:00
2023-10-09 20:29:52 -04:00
2023-10-09 20:29:52 -04:00