4 ms·
For those surprised at the dot product benchmark on 3.1 [0] where np.dot() is substantially faster when using floats over ints, the things is simply that numpy
by dr_zoidberg 5y ago
For those surprised at the dot product benchmark on 3.1 [0] where np.dot() is substantially faster when using floats over ints, the things is simply that numpy can use BLAS libraries for floats, but not for ints (because BLAS libs don't implement integer data types).
[0] https://tvm.d2l.ai/chapter_cpu_schedules/arch.html https://tvm.d2l.ai/chapter_cpu_schedules/arch.html
[1] https://stackoverflow.com/questions/11856293/numpy-dot-product-very-slow-using-ints https://stackoverflow.com/questions/11856293/numpy-dot-produ...
- momojo 5y agoThere's a great explanation on algorithmica as well: https://en.algorithmica.org/hpc/complexity/languages/ https://en.algorithmica.org/hpc/complexity/languages/