2 ms·
> How suitable or unsuitable is APL for matrix multiplication Matrix-multiply is just plus-dot-times or +.× > which language has faster execution times, Pytho
by geocar 9y ago
> How suitable or unsuitable is APL for matrix multiplication
Matrix-multiply is just plus-dot-times or +.×
> which language has faster execution times, Python or APL?
This is tricky to answer. For most problems, I'd say APL, but this is isn't quite fair.
A competent Python programmer who has made it "as fast as possible" without resorting to extensions will be creamed by a novice APL programmer, so you need to consider third-party modules like NumPy just to compete.
Now NumPy is very well-optimised, but you'll really struggle to do well against k/q[1] an APLish that actually focuses on performance, and if you run into a problem where it doesn't, there are extensions you can use to eke out even more performance.
At this point, you might try using Tensorflow -- which gives Python a great edge -- but are we really programming Python anymore? kdb+ can use Tensorflow as a library as well...
[1]: http://tech.marksblogg.com/billion-nyc-taxi-kdb.html http://tech.marksblogg.com/billion-nyc-taxi-kdb.html fastest non-GPU
- JulianMorrison 9y agoIt's a style difference between "optimized C and ASM kernels wrapped in a slow heavyweight language" and "a very simple interpreter that fits in cache". Circumstances are probably going to drive which approach wins out.