7 ms·
The Mandelbrot example seems to make interpreted Python stand in for "the CPU performance"? If that's true, then I'm surprised they only see a 10x speed-up. I
by Matumio 3y ago
The Mandelbrot example seems to make interpreted Python stand in for "the CPU performance"?
If that's true, then I'm surprised they only see a 10x speed-up. I would expect more from only compiling that loop for the CPU. (Comparing to interpreted Python without numpy.) Given they already have a numba version, why not compile it for the CPU and compare?
Also, they say consumer CPUs have 2-16 cores. (Who has 2 cores these days?) They go on suggest to rent an AWS GPU for $3 per hour. You're more likely to get 128 cores for that price, still on a single VM.
Not saying it will be easy to write multi-threaded code for the CPU. But if you're lucky, the Python library you're using already does it.
- lucb1e 3y ago> Also, they say consumer CPUs have 2-16 cores. (Who has 2 cores these days?) Pretty sure my mom's laptop has 2 cores; I can't think of anyone whose daily driver has 16 cores. Real cores, not hyperthread stuff running at 0.3× the performance of a real core. As for the 128-core server system, note that those cores are typically about as powerful as a 2008 notebook. My decade-old laptop CPU outperforms what you get at DigitalOcean today, and storage performance is a similar story. The sheer number makes up for it, of course, but "number of cores" is not a 1:1 comparable metric. Agree, though, that the 10x speedup seems low. Perhaps, at 0.4s, a relatively large fraction of that time is spent on initializing the Python runtime (`time python3 -c 'print("1337")'` = 60ms), the module they import that needs to do device discovery, etc.? Hashcat, for example, takes like 15 seconds to get started even if it then runs very fast after that.
- 65a 3y agoMy 2016 desktop had 22 cores and 44 threads. You can have the same processor for < $200 on ebay right now.
- lucb1e 3y agoCool, now I know one person :D I don't think the price matters btw. If 4 cores is all I need (I can't think of a desktop application that I use which benefits from more than 4 cores more than from faster cores, which is typically the trade-off at >4 real cores) then that's what I'd get because that's the optimum for my wallet and performance profile.