Skip to content

fix: improve nonce performance#162

Merged
mpetrunic merged 4 commits intomasterfrom
tuyen/nonce
Jun 23, 2022
Merged

fix: improve nonce performance#162
mpetrunic merged 4 commits intomasterfrom
tuyen/nonce

Conversation

@twoeths
Copy link
Copy Markdown
Contributor

@twoeths twoeths commented Jun 21, 2022

Motivation

Description

  • New Nonce class containing above data with getUint64(), getBytes() and increase() method
  • New benchmark shows it's 150x faster

@twoeths twoeths changed the title perf: improve nonce feat: improve nonce Jun 21, 2022
@twoeths twoeths changed the title feat: improve nonce feat: improve nonce performance Jun 21, 2022
Introduce Nonce class to maintain both Uint8Array and DataView and uint64 so that we can remove nonceToBytes function
Comment thread src/@types/nonce.ts Outdated
Comment thread src/handshakes/abstract-handshake.ts Outdated
@mpetrunic
Copy link
Copy Markdown
Member

Great to hear we will optimize noise 👍🏻

@twoeths twoeths marked this pull request as ready for review June 21, 2022 07:32
@twoeths twoeths requested a review from a team as a code owner June 21, 2022 07:32
@twoeths twoeths requested a review from mpetrunic June 21, 2022 07:32
Copy link
Copy Markdown
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

General structure looks good, good performance boost

Comment thread src/nonce.ts Outdated
Comment thread src/nonce.ts
Comment thread src/handshakes/abstract-handshake.ts Outdated
Comment thread src/handshakes/abstract-handshake.ts Outdated
Comment thread src/nonce.ts Outdated
Comment thread benchmarks/nonce.js
@mpetrunic mpetrunic changed the title feat: improve nonce performance fix: improve nonce performance Jun 23, 2022
@mpetrunic mpetrunic dismissed wemeetagain’s stale review June 23, 2022 10:18

stale/resolved

@mpetrunic mpetrunic merged commit 9b04145 into master Jun 23, 2022
@mpetrunic mpetrunic deleted the tuyen/nonce branch June 23, 2022 10:18
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.

4 participants