use Rc<str> in cycle for all strings #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
should not affect parsing time, but speeds up event generation time by ~25%, as all those strings no longer need to be cloned/copied for each generated event
ideally those strings should be string slices, pointing to the original input string, using Cow, but this really hard to realize with Rust lifetimes
@unlessgames
This is the second most low hanging fruit after #26 (which I'm having build troubles with) and partly my "fault" as I've introduced that "string" copy in Event. Also a good test for the PR benchmarks.
The Rc stuff isn't nice, but at least a common pattern in Rust in such cases...
Fine with me to skip this. Your decision. The performance gains are not that big.