Why would a fast computer run Julia slower than a slow computer?


I have two computers, both running Julia v0.6 on Windows 10 x64:

  • My laptop is just shy of 4 years old. It has an intel i5-2400u @ 1.6GHz, 2 cores, 4 threads. With Geekbench, its single-core CPU score is 2985.
  • My desktop was most recently upgraded two months ago. It has a Ryzen 5 1600X @ 3.6Ghz, 6 cores, 12 threads. With Geekbench, its single-core CPU score is 4178.

However, single-threaded Julia runs faster on the laptop. For example, here are the results of running the following code on both computers:

x = [peakflops(parallel = false) for _ in 1:30]
mean(x), extrema(x)

Laptop (2.82e10, (2.49e10, 2.89e10))
Desktop (1.63e10, (1.53e10, 1.68e10))
So the more modern desktop, which we would expect from the Geekbench scores to be about 40% faster, is barely half as fast as the laptop.

And this isn’t just a BLAS difference between the computers either. I first noticed this issue when timing some simulations which are written in pure Julia. These simulations don’t involve any linear algebra; it’s all random number generation, manipulating DateTime objects, sorting and shuffling lists, dictionary lookup, etc. Even so, the older laptop runs these simulations almost twice as fast as the modern desktop.

Any thoughts on why this might be or more principled ways to do an apples-to-apples comparison between the computers?


Is the system-image built for your processor? See point 7 in http://www.stochasticlifestyle.com/7-julia-gotchas-handle/


Yup, thought of that as soon as I wrote the post. You’re right, of course. After building the system image, the desktop runs the simulations about 37% faster than the laptop, single threaded. The BLAS/peakflops performance is unchanged though.


peakflops has nothing to do with the sysimg build. I kinda doubt openblas (especially the one you use) have be upgraded to recognize Ryzen.