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

Use faster loop iter (despite clippy's advice) #59

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

michaelkirk
Copy link
Member

@michaelkirk michaelkirk commented Jan 25, 2024

  • I agree to follow the project's code of conduct.
  • [n/a] I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Inspired by a9b8f92.

I confess that I'm surprised to see this much improvement from a small change like this.

$ cargo bench --bench="*" rust --  --baseline=main-2024-01-25
direct (rust impl)/default
                        time:   [27.773 µs 27.806 µs 27.842 µs]
                        change: [-4.9255% -4.6540% -4.3868%] (p = 0.00 < 0.05)
                        Performance has improved.

inverse (rust impl)/default
                        time:   [70.088 µs 70.139 µs 70.194 µs]
                        change: [-9.8981% -9.7426% -9.5881%] (p = 0.00 < 0.05)
                        Performance has improved.

    $ cargo bench --bench="*" rust --  --baseline=main-2024-01-25
    direct (rust impl)/default
                            time:   [27.773 µs 27.806 µs 27.842 µs]
                            change: [-4.9255% -4.6540% -4.3868%] (p = 0.00 < 0.05)
                            Performance has improved.

    inverse (rust impl)/default
                            time:   [70.088 µs 70.139 µs 70.194 µs]
                            change: [-9.8981% -9.7426% -9.5881%] (p = 0.00 < 0.05)
                            Performance has improved.
@michaelkirk michaelkirk enabled auto-merge January 25, 2024 23:13
@michaelkirk michaelkirk merged commit 4891fc4 into main Jan 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant