Skip to content
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

Make string equality faster #2627

Closed
catamorphism opened this issue Jun 15, 2012 · 2 comments
Closed

Make string equality faster #2627

catamorphism opened this issue Jun 15, 2012 · 2 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@catamorphism
Copy link
Contributor

core::str::eq has a comment explaining that it implements string equality in Rust rather than using == in order to save a call into the shape code. It should be just as efficient to write a == b, or at least I assume that's the intent behind the FIXME.

@pcwalton
Copy link
Contributor

This should hopefully be fixed by @graydon's visitor work.

@pcwalton
Copy link
Contributor

Fixed.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 29, 2022
update ignore-windows comments

Turns out 2 of these tests can actually be enabled. :)
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Jan 6, 2023
update ignore-windows comments

Turns out 2 of these tests can actually be enabled. :)
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 12, 2023
Allow implementing `Hash` with derived `PartialEq` (`derive_hash_xor_eq`

This is a common pattern and is totally allowed by the `Hash` trait.

Fixes rust-lang#2627

changelog: Move: Renamed `derive_hash_xor_eq` to [`derived_hash_with_manual_eq`]
[rust-lang#10184](rust-lang/rust-clippy#10184)
changelog: Enhancement: [`derived_hash_with_manual_eq`]: Now allows `#[derive(PartialEq)]` with custom `Hash` implementations
[rust-lang#10184](rust-lang/rust-clippy#10184)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

2 participants