3 ms·
Just recently I replaced an internal library (classes for User and a list of users, that need serialization from and to json) with a Python library written in R
by atoav 5y ago
Just recently I replaced an internal library (classes for User and a list of users, that need serialization from and to json) with a Python library written in Rust (using pyo3 and maturin).
I did not do it for performance considerations, but because I felt the type system of Rust could give me better guarantuees here (and it did, I found multiple bugs this way).
On top the performance gain was noticible, although I did not bother to benchmark it.
There are still some gotchas in the conversion from Python types to Rust (e.g. a function which takes a Vec<String> will happily accept a str and produce a vector of the str characters. This is common behaviour in Python where I tend to do a isinstance(value, str): value = [value] to deal with this.