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

Optimize NonFatal(...) checks #3223

Merged

Conversation

armanbilge
Copy link
Member

See bytecode analysis in:

Copy link
Member

@djspiewak djspiewak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I'll run some benchmarks on this quickly before we merge.

@djspiewak
Copy link
Member

Did a pair of benchmark runs (before, after). You can toss these into https://jmh.morethan.io/ to see things visually, but the tldr is that this PR results in absolutely zero change in performance outside the margin of error (there's some noise from run to run, and notably the parTraverse benchmark appears to have been bad in the first run). I find this fascinating, because it suggests that the JVM's escape analysis is eliding the allocation cost of the NonFatal extractor once warmed up.

@djspiewak djspiewak merged commit 6d0725e into typelevel:series/3.4.x Nov 12, 2022
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