4 ms·
Use the scientific stack in python for that type of analysis. Yes, anything with one function call per item is going to be slow. That, along with memory ineff
by jofer 7y ago
Use the scientific stack in python for that type of analysis.
Yes, anything with one function call per item is going to be slow. That, along with memory inefficiency of lists, is the reason why numpy exists.
- maartenbreddels 7y agoIndeed, numpy for numerical calculations. For strings, we have our own data structure based on Apache Arrow, but we plan/hope to move to Apache Arrow (in combination with numpy), since that's kind of the numpy++ for data science work.
- uoaei 7y agoFor simply-vectorizable analysis, sure, but in my work I often have to apply a nontrivial transformation to the data en masse and I'd rather define a single function which defines the transformation on each row to trying to wrestle the problem into one of matrix multiplications and additions.
- Akababa 7y agoDoes numba help? In the article they use it to calculate distance taking into account the curvature of the earth (lol).
- maartenbreddels 7y agoIndeed, numba, Pythran or cupy can be really useful. In the example of the article, it is 'simple' vectorized math. But in general any function can be added in Vaex. Those that go through numba or Pythran usually release the GIL and can get you an enormous speed boost.