3 ms·
Why would you want to use rust here in the first place? Won't it just slow down your iteration time?
by BubRoss 7y ago
Why would you want to use rust here in the first place? Won't it just slow down your iteration time?
- lumost 7y agoNot the OP, but also interested in similar applications of rust. The two main benefits I see are 1) Speed and memory efficiency, I've often worked in python/pandas and been frustrated by its performance. If I have a job that takes 12 hours to churn through all of the data, flipping over to rust may accelerate my iteration time to ~7.2-72 minutes. 2) Straightforward FFI bindings into other languages. Like C you can trivially bind rust code into python. Language choice can then be a bit of a two-way door back to python.
- Icathian 7y agoYou pretty much nailed my reasons as well. Trying to explain that updating model results for this month's data will take 12 hours usually does not go over well. The learning curve to move stuff to Rust would be considered well worth it.
- BubRoss 7y agoI thought pandas called into C libraries, does it not run close to native speeds?
- lumost 7y agoIt depends on what type of object you're using in pandas as well as whether you ever need to use a User Defined function e.g. pd.Series.map. Crossing between python objects and C objects is incredibly slow, and python defined UDFs will usually run at python speed. In most of my projects I'm unable to avoid using a udf/python data manipulation at some point.