Skip to content

fix: optimize BigInt usage in hash function - #1003

Merged
vplasencia merged 1 commit into
semaphore-protocol:mainfrom
reallesee:main
Aug 6, 2025
Merged

fix: optimize BigInt usage in hash function#1003
vplasencia merged 1 commit into
semaphore-protocol:mainfrom
reallesee:main

Conversation

@reallesee

@reallesee reallesee commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

Description

Replace BigInt(8) with 8n literal in bit shift operation to improve performance by avoiding unnecessary BigInt object creation.

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn format and yarn lint without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vplasencia vplasencia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thank you very much @reallesee

@vplasencia
vplasencia merged commit 81dbf86 into semaphore-protocol:main Aug 6, 2025
4 checks passed
@gitpoap-bot

gitpoap-bot Bot commented Aug 6, 2025

Copy link
Copy Markdown

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2025 Semaphore Contributor:

GitPOAP: 2025 Semaphore Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs 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.

2 participants