-
Notifications
You must be signed in to change notification settings - Fork 15
Optimize: replace String with Cow<'_, str>
#60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@haydenhoang check it out. Does it look good? |
|
There is a problem which I have skipped, in OpenApi generation: Somehow it thinks that |
|
Hey @RoDmitry do you have any benchmark showing performance gain from replacing Doing that make the code more complex and harder to maintain (lifetimes, phantom data), and I think the user might prefer the easy use of |
|
Benchmark of the clones? I don't think that's necessary. That's an obvious optimization. There will be significant performance gain, if you benchmark it. I don't want to, because I understand how slow memory allocations are. User will not be bothered by the lifetimes much. It's either local lifetime or Although I agree that |
Less
Stringclones -> more performance 😊Also Derive optimizations.