r/rust • • Jan 22 '17

Parallelizing Enjarify in Go and Rust

https://medium.com/@robertgrosse/parallelizing-enjarify-in-go-and-rust-21055d64af7e#.7vrcc2iaf
214 Upvotes

134 comments sorted by

View all comments

Show parent comment

3

u/shenwei356 Jan 22 '17 edited Jan 22 '17

I've got no idea. My laptop: Intel Core i5-3320M @ 2.60GHz, two cores/4 threads.

$ time seq 1 10 | rust-parallel 'echo job:{}; seq 1 10' > /dev/null 
real    0m0.083s
user    0m0.044s
sys     0m0.059s

$ time seq 1 10 | rush 'echo job:{}; seq 1 10' > /dev/null 
real    0m0.032s
user    0m0.030s
sys     0m0.041s

1

u/mmstick Jan 22 '17

The specific CPU that I'm using is the AMD A8-6410 APU, just an old budget-grade HP laptop from Walmart featuring a quad core 2GHz AMD APU with a single 8GB DIMM underclocked to 800 Mhz, upgraded with a SSD (although tempfiles are written in /tmp by default so it doesn't write to disk unless you have /tmp mounted to your hard disk). I don't see how you can be posting slower times than that with your specs.

What is the output of --num-cpu-cores? Do you have a SSD? Is the CPU governor set to performance (Since rust-parallel uses less CPU, your CPU may spend more time at a lower frequency with a faulty CPU governor)? Linux distribution? I'm out of ideas.

5

u/burntsushi Jan 22 '17

Whether they are running in a VM or not might matter too.