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

convert skip to iterate instead of call recursive functions #111

Merged
merged 4 commits into from
May 31, 2024

Conversation

davidhewitt
Copy link
Collaborator

The observation is that "skip" functionality shouldn't be hard to avoid function recursion because the return type is always (). So here's an attempted implementation. Should hopefully be faster...

Copy link

codspeed-hq bot commented May 29, 2024

CodSpeed Performance Report

Merging #111 will improve performances by 66.7%

Comparing dh/iter-skip (aa6b268) with main (366d16a)

Summary

⚡ 4 improvements
✅ 69 untouched benchmarks

Benchmarks breakdown

Benchmark main dh/iter-skip Change
big_jiter_skip 19.6 ms 17.5 ms +11.87%
pass2_jiter_skip 3.5 µs 2.1 µs +66.7%
short_numbers_jiter_skip 61 µs 55.1 µs +10.7%
x100_jiter_skip 1.3 µs 1.2 µs +10.11%

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 6 lines in your changes are missing coverage. Please review.

Files Patch % Lines
crates/jiter/src/value.rs 89.47% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@samuelcolvin samuelcolvin merged commit a4cf796 into main May 31, 2024
21 checks passed
@samuelcolvin samuelcolvin deleted the dh/iter-skip branch May 31, 2024 12:33
@samuelcolvin
Copy link
Member

This is great, thank you.

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.

2 participants