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

Feat improve bech32 perf #297

Closed

Conversation

remybar
Copy link

@remybar remybar commented Aug 18, 2024

Related to #74.

This PR uses Cairo 2.7.0 so it depends on the PR #296 (which is blocked until snfoundry has been updated to work with Cairo 2.7.0).

Proposed optimizations:

  • use a const fixed-size array for alphabet,
  • direct conversion from ByteArray to 5-bits chunks,
  • use for in loop in encode,
  • avoid creating temporary arrays,
  • hardcode generator loop in polymod,
  • avoid using shr in polymod,
  • call polymod directly, without intermediate arrays.

Note that all modifications have been done in bech32.cairo. The other modifications come from the PR #296.

Copy link

vercel bot commented Aug 18, 2024

@remybar is attempting to deploy a commit to the keep-starknet-strange Team on Vercel.

A member of the Team first needs to authorize it.

@remybar
Copy link
Author

remybar commented Sep 4, 2024

Hi @maciejka !

This project looks like paused. Is it useful that I continue on the bump to Cairo 2.7 (#296) and to this PR ?

@maciejka
Copy link
Collaborator

maciejka commented Sep 4, 2024

Hi @maciejka !

This project looks like paused. Is it useful that I continue on the bump to Cairo 2.7 (#296) and to this PR ?

'Paused' is a right word.

@remybar
Copy link
Author

remybar commented Sep 4, 2024

Hi @maciejka !
This project looks like paused. Is it useful that I continue on the bump to Cairo 2.7 (#296) and to this PR ?

'Paused' is a right word.

Oh ok 😕 Thanks for your feedback and for the reward on OnlyDust ;-)

@remybar remybar closed this Sep 4, 2024
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