News for hackers. Stuff that matters.
Re:Grappling with Go by j1f4 on Wednesday February 08, 2017 @11:14AM (#13599351)
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.

Re:Grappling with Go by dcu on Wednesday February 08, 2017 @11:36AM (#13599579)
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.

Re:Grappling with Go by j1f4 on Wednesday February 08, 2017 @12:15PM (#13599989)
If you are running the program with `cargo run` that takes the same --release flag. Could be the machine difference though.
Re:Grappling with Go by dcu on Wednesday February 08, 2017 @01:50PM (#13600899)
I'm not. Are you testing with go 1.8 btw?
Re:Grappling with Go by j1f4 on Wednesday February 08, 2017 @02:39PM (#13601334)
Go 1.7.4 and rust 1.14. Interesting discrepancy in the relative speeds of the tools we are seeing.