openrr / urdf-rs

URDF parser for Rust
Apache License 2.0
30 stars 11 forks source link

Do not compile regular expression per function call #18

Closed taiki-e closed 3 years ago

taiki-e commented 3 years ago

Currently, expand_package_path compiles regular expression per it called. This is not very efficient.

Refs: https://github.com/rust-lang/regex/blob/master/PERFORMANCE.md#thou-shalt-not-compile-regular-expressions-in-a-loop