Hacker News new | ask | show | jobs
by j1f4 3419 days ago
Pass 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.

1 comments

I'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.

If you are running the program with `cargo run` that takes the same --release flag. Could be the machine difference though.
I'm not. Are you testing with go 1.8 btw?
Go 1.7.4 and rust 1.14. Interesting discrepancy in the relative speeds of the tools we are seeing.