4 ms·
So I have to wonder about the performance difference between his sloccount and loc (https://github.com/cgag/loc https://github.com/cgag/loc) which is so fast it
by IshKebab 10y ago
So I have to wonder about the performance difference between his sloccount and loc (https://github.com/cgag/loc https://github.com/cgag/loc) which is so fast it always makes me think that it hasn't done anything (same as ripgrep).
I'm like 98% sure loc will be faster, but it would be interesting to know by how much.
- dcu 10y agoso I ran this test using the linux source code. I warmed everything to prevent caching/buffering advantages. For loc the best time was: 55.425s and the worst was: 1m30.557s For loccount the best time was: 42.345s and the worst was: 56.396s loc supports more languages but I also believe it has more false positives. loc reporting seems nicer as well.
- j1f4 10y agoPass the release flag when you build loc; `cargo build --release`. I see ~5 seconds for loc and ~34 seconds for loccount to count a freshly cloned linux repository. edit: woops, that was user time. These both spin all the cores. loc takes ~0.7 secs and loccount ~6.6 secs real time.
- dcu 10y agoI'm not seeing any changes in my results. I'm testing in an old laptop, I guess that's why it's so slow. My rustc version is 1.15.0 and go 1.8.