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

Refactor polymorphic keys method #941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tagliala
Copy link
Contributor

Use select instead of map.compact to:

  • Eliminate unnecessary object creation and array compaction
  • Maintain identical functionality
  • Improve readability and performance
Comparison (IPS):
                keys:  1716164.8 i/s
            keys_old:  1531182.7 i/s - 1.12x  (± 0.00) slower

Comparison (Memory):
                keys:        120 allocated
            keys_old:        160 allocated - 1.33x more

Use `select` instead of `map.compact` to:
- Eliminate unnecessary object creation and array compaction
- Maintain identical functionality
- Improve readability and performance

```
Comparison (IPS):
                keys:  1716164.8 i/s
            keys_old:  1531182.7 i/s - 1.12x  (± 0.00) slower

Comparison (Memory):
                keys:        120 allocated
            keys_old:        160 allocated - 1.33x more
```
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.92%. Comparing base (1aeb754) to head (17e48bd).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #941   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files          14       14           
  Lines         557      557           
=======================================
  Hits          551      551           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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