This change adds the import to the rust-cpython bindings and uses
them when appropriate.
A wrapper function has been defined in the case of _regex to
keep this patch simple.
This change adds the import to the rust-cpython bindings and uses
them when appropriate.
A wrapper function has been defined in the case of _regex to
keep this patch simple.
Lint Skipped |
Unit Tests Skipped |
We (read Octobus) are planning very soon to start benchmarking Rust vs non-Rust Mercurial, so I'll hopefully have an answer within a few weeks.
Though If I had to take a guess, I'd say these patches as well as the few next ones will be detrimental to performance in the short-term. This is because of some limitations in the rust-cpython bindings (some of which are more difficult to fix than others), the inherent overhead of doing ffi, Python idoms awkward for Rust, etc..
The C code I'm re-implemented in some modules is very heavily optimized, but the current approach is to build enough critical mass to have the Rust bits of code interacting as little as possible with Python and then start optimizing/parallelizing.