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

Override some Option Apply/Applicative methods #3516

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

johnynek
Copy link
Contributor

The Option Applicative is very simple, but the default implementations have a lot of closures and falls back to flatMap/map quite a bit.

By implementing these in terms of ifDefined/get then most of it should be simple JVM bytecode that the jit is very good at optimizing.

@johnynek johnynek changed the title Override some Monad Apply/Applicative methods Override some Option Apply/Applicative methods Jul 12, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #3516 into master will decrease coverage by 0.04%.
The diff coverage is 85.00%.

@@            Coverage Diff             @@
##           master    #3516      +/-   ##
==========================================
- Coverage   91.54%   91.49%   -0.05%     
==========================================
  Files         386      386              
  Lines        8476     8493      +17     
  Branches      217      230      +13     
==========================================
+ Hits         7759     7771      +12     
- Misses        717      722       +5     

@johnynek johnynek merged commit dca5b2a into master Jul 14, 2020
@travisbrown travisbrown added this to the 2.2.0-RC2 milestone Jul 17, 2020
@larsrh larsrh deleted the oscar/improve_option_applicative branch September 19, 2020 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants