danielpclark / faster_path

Faster Pathname handling for Ruby written in Rust
MIT License
780 stars 29 forks source link

Reduce allocations in `prepend_prefix` #152

Closed glebm closed 6 years ago

glebm commented 6 years ago

Performance change for:

Note that the cleanpath* functions still do a lot of unnecessary heap allocations via to_string().

danielpclark commented 6 years ago

The implementations are cloned Ruby code to Rust. As you've already proven I'm sure there's room for more optimization.