Skip to content

Conversation

MikaelFangel
Copy link
Contributor

@MikaelFangel MikaelFangel commented Oct 13, 2024

This pr simplifies digits and undigits and removes some guard clauses.

Changes

  • Removes redundant do_ from the function heads which are separated by their arity anyway.
  • Simplify guard clauses

Performance results

Screenshot 2024-10-13 at 14 14 00

Copy link
Contributor

@sabiwara sabiwara left a comment

Choose a reason for hiding this comment

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

Small suggestion otherwise looks good and indeed simpler.
No strong opinion on the do_ thing, arity differences are sometimes less easy to spot.

@MikaelFangel
Copy link
Contributor Author

Sorry, I forgot to check the formatting.

@sabiwara
Copy link
Contributor

Screenshot 2024-10-13 at 23 23 48

Looks solid! ⚡ Great job @MikaelFangel

@sabiwara sabiwara merged commit 0c7459e into elixir-lang:main Oct 13, 2024
9 checks passed
@MikaelFangel
Copy link
Contributor Author

Thank you 🥳

@MikaelFangel MikaelFangel deleted the simplify_integer_digits branch October 13, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants