-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable memchr feature by default? #552
Comments
My concern here is less about the dependency (as trillium-http depends on memchr nonoptionally) but uncertainty about whether it represents a performance improvement. I did some benchmarking and it seems to depend on several things, including the path length and whether it can be inlined across crate boundaries, which is something only the application binary can influence with lto=fat. Using memchr represented a slight performance regression when lto=thin, but maybe that's acceptable as the default? |
Ah, I see. I would have expected the That aside, inlining across crate boundaries should be possible with an explicit |
Really? That's great news! Is that related to rust-lang/rust#116505? |
@jbr No, that issue is about doing inlining even without |
I did some more benchmarking and it seems like now I'm getting a slight benefit from memchr, so I'm content to make it the default (or probably just remove the feature, since trillium itself already requires memchr) |
Should trillium-routes enable memchr by default for performance, and let people who want to avoid the dependency (and don't already have it elsewhere in their dependency tree) disable default features?
The text was updated successfully, but these errors were encountered: