Skip to content

Commit

Permalink
PRNG: Address 'TODO: benchmark' comment
Browse files Browse the repository at this point in the history
The alternative big-endian read impl is indeed slower.
  • Loading branch information
larry-the-table-guy committed Jan 12, 2025
1 parent d3e60b3 commit eea8dfc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sim/prng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ export class SodiumRNG implements RNG {
this.seed = buf.slice(0, 32);
// reading big-endian
return buf.slice(32, 36).reduce((a, b) => a * 256 + b);
// alternative, probably slower (TODO: benchmark)
// return parseInt(Utils.bufReadHex(buf, 32, 36), 16);
}
}

Expand Down

0 comments on commit eea8dfc

Please sign in to comment.