|
|
|
|
|
by pcwalton
4122 days ago
|
|
Just one glance at the Rust version (e.g. [1]) shows a lot of needless allocation. For example: if *strn == "&".to_string() { ... }
is a very slow (and verbose) way to write if &strn[..] == "&" { ... }
and rr_string("'".to_string() + k.to_string() + "' not found".to_string())
is a very slow (and verbose) way to write rr_string(format!("'{}' not found", k))`
Etc. etc.[1]: https://github.com/kanaka/mal/blob/master/rust/src/env.rs |
|
EDIT: further, looks like it's on a really old Rust: https://github.com/kanaka/rust-pcre wasn't updated since October...
EDIT 2: I tried to update the code, but it's really, really out of date, and will be a ton of work. So I've just submitted https://github.com/kanaka/mal/pull/23 instead. :(