When the lazy-init feature is enabled, regexes are lazily initialized, which is more efficient if you want to convert A LOT of strings. The performance difference has not been tested.
I recently ran into a large performance-related regression as a result of our use of this crate. The lazy-init feature should be a default feature to avoid people having to discover this on their own!
You can see in the flamegraph above that most of the on-CPU time in the server is spent recompiling the regular expression.
The README suggests:
I recently ran into a large performance-related regression as a result of our use of this crate. The lazy-init feature should be a default feature to avoid people having to discover this on their own!
You can see in the flamegraph above that most of the on-CPU time in the server is spent recompiling the regular expression.