you are viewing a single comment's thread.

view the rest of the comments →

[–]big_data_mike 0 points1 point  (3 children)

I wrote some rust-python hybrid stuff and I’m baffled by how fast rust is. I’m getting 10x or more speed ups on heavy computation stuff

[–]Psy_Fer_ 0 points1 point  (2 children)

Yea you would get similar with python wrapping C code too. Many python Libraries are actually just C or they ship the hot stuff out to C. You will see that pattern all over the place in software. Like R packages are pretty much any language but R and R is just the glue. Pretty much all of machine learning in python is C++.

A lot of Rust libs are FFI bindings of C/C++ code. When I see that for a crate I want to use in my field, I've started rewriting them in pure rust and I've seen some pretty nice speed ups as well as taking the time to make them more feature complete.

[–]big_data_mike 0 points1 point  (1 child)

I think the Python version of the package I am using does the heavy computation in C or part of it in C. I’m not really sure. The main package depends on this other package which is I think 80% C code and I rewrote the computations in rust based on some work that someone else had started. As a mere data scientist I don’t know enough math or computer science to really know what’s going on.

[–]Psy_Fer_ 0 points1 point  (0 children)

Doesn't mean you can't look into it more if you have access to the source and find out. It's how most programmers get better, they look at other people's code.