4 ms·
Difficult to draw conclusions with no code here. An interesting thing they didn't mention is that Matplotlib's point-in-path code is actually already in C. So
by timhh 2y ago
Difficult to draw conclusions with no code here.
An interesting thing they didn't mention is that Matplotlib's point-in-path code is actually already in C. So this isn't really a case of Rust being X times faster than Python, it's X times faster than some other C algorithm. That's probably why X is only ~4 (they don't actually give a single-thread comparison), instead of ~50.
https://github.com/matplotlib/matplotlib/blob/cb487f3c077c93e1f51615d32af04f13d1b9821a/src/_path.h#L105 https://github.com/matplotlib/matplotlib/blob/cb487f3c077c93...
I expect the Rust code is faster because that code is waaaaay more complicated than what they probably need (https://stackoverflow.com/q/11716268/265521 https://stackoverflow.com/q/11716268/265521) - e.g. it handles stroke widths.
IMO this result is not very interesting.