3 ms·
> You cannot do that at all in Python. Well, you can, but it will be orders of magnitude slower. NumPy + Cython would beg to differ.
by kevin_thibedeau 10y ago
> You cannot do that at all in Python. Well, you can, but it will be orders of magnitude slower.
NumPy + Cython would beg to differ.
- enriquto 10y agoOf course, but not natively. Try doing that in plain python using a list of 8000 lists of 8000 lists of 3 numbers (e.g. a mid-resolution microscopy image).
- dagss 10y agoNumPy is about one order of magnitude slower in very many situations. Cython is in some ways a reimplementation of Fortran in places -- I mean, you can consider it a better alternative but have to use features that are not in Python. Personally I gave up writing numerical code in Cython and instead wrote it in Fortran and merely wrapped it with Cython... But yes, being 2x-10x slower is something one can live with for productivity, vs sometimes 1000x slower of Python.