Skip to content

Optimize Base58 encoding/decoding #2118

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

Closed
wants to merge 2 commits into from
Closed

Conversation

VolodymyrBg
Copy link

  • Use Object.fromEntries for inverse alphabet creation
  • Replace let with const for immutable variables
  • Add bounds checking to prevent potential errors
  • Optimize toBase58 and fromBase58 algorithms
  • Improve type safety with explicit type annotations
  • Special case handling for empty inputs

@VolodymyrBg VolodymyrBg requested review from a team as code owners April 2, 2025 16:50
@VolodymyrBg VolodymyrBg requested review from 45930 and ymekuria April 2, 2025 16:50
Copy link
Contributor

@45930 45930 left a comment

Choose a reason for hiding this comment

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

I'm not convinced that there's enough value here to merge. Do you think this change actually improves o1js?

@mitschabaude
Copy link
Contributor

mitschabaude commented Apr 2, 2025

this makes the code harder to read, and I don't see any significant improvements. wouldn't merge.

at least if you claim optimizations there should be benchmarks!

@45930 45930 closed this Apr 2, 2025
@VolodymyrBg VolodymyrBg deleted the bg branch April 2, 2025 19:38
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.

3 participants