Continuing to play with building the fastest possible code counter. Actually getting performance CLOSE to what ripgrep gets which is impressive since I am processing every byte. ~5 seconds to process the Linux kernel.
-
Show this thread
-
That's on my machine though. Ripgrep rips through it in about ~4 seconds. Looking forward to benchmark comparisons with cloc, sloccount and tokei when the time comes.
2 replies 0 retweets 0 likesShow this thread -
Replying to @boyter
What query are you feeding to ripgrep? 4 seconds on the Linux kernel sounds really slow to me. Take a look at the timings in the README: https://github.com/BurntSushi/ripgrep#quick-examples-comparing-tools …
2 replies 0 retweets 1 like -
Replying to @burntsushi5
“rg a .” To force it to work harder. Running using hyper fine with 3 warmup runs and 10 runs so not measuring disk io. What’s slowing it down is I’m using WSL which is know to have disk speed issues.
1 reply 0 retweets 0 likes -
Replying to @boyter
Oh I see! Yeah that's much more believable. Try `rg '^.+$'` to make it work even harder. ;-) (It runs in just under a second on my machine, but that's an order of magnitude slower than a simple `rg PM_RESUME` for example.)
1 reply 0 retweets 1 like -
Replying to @burntsushi5 @boyter
Also, note that a good chunk of that is probably going to be benchmarking output, which probably defeats some of the purpose of the comparison. If you do `rg '^.+$' -c`, which will count every match instead of printing every match, then you might get a bit closer.
2 replies 0 retweets 1 like -
Replying to @burntsushi5
To be honest I was using ripgrep to A warm up the disk cache and B just give a reasonable idea of how fast its possible to move through the code. Noticed your comments on https://www.reddit.com/r/rust/comments/82k9iy/loc_count_lines_of_code_quickly/ … which is what I am now benching against :)
1 reply 0 retweets 0 likes -
-
Replying to @burntsushi5
Hope so! Never needed to write code with this level of performance requirements before. Rather refreshing way to think about things.
1 reply 0 retweets 1 like
w.r.t. https://github.com/boyter/scc I really think you should be giving the `-c` flag to ripgrep. Line counters print aggregate statistics, and comparing that with a command that prints virtually every line that it prints it not particularly meaningful. :-)
-
-
Replying to @burntsushi5
Its funny, I tried that and it made no real difference. Not sure what voodoo hyperfine is doing under the hood. Ill add it in when I do the real benchmarks though. Still a long way to go before that happens though :)
1 reply 0 retweets 1 like -
Replying to @boyter
Strange. It made a *dramatic* difference on my end (using hyperfine). I also can't seem to reproduce your relative ranking on the single threaded benchmarks, but it's not too different.
2 replies 0 retweets 1 like - 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.