Skip to content

perf: minor optimizations in benchmark and build scripts - #217

Closed
3ni8ma wants to merge 1 commit into
chenglou:mainfrom
3ni8ma:fix/minor-optimizations
Closed

3ni8ma wants to merge 1 commit into
chenglou:mainfrom
3ni8ma:fix/minor-optimizations

Conversation

@3ni8ma

@3ni8ma 3ni8ma commented Aug 24, 2026

Copy link
Copy Markdown

Implements minor optimizations suggested in issue #179.

Changes:

  • Use bitwise shift instead of Math.floor division in median()
  • Use bitwise AND for parity check instead of modulo
  • Simplify exitCode check to truthy test

Closes #179

- Use bitwise shift (>>) instead of Math.floor division in median()
- Use bitwise AND (&) for parity check instead of modulo (%)
- Simplify exitCode check to truthy test

Closes chenglou#179
@chenglou

Copy link
Copy Markdown
Owner

Thanks! But see my comment at #179 (comment). It feels these have very minor gains and I'm not sure they're worth it, but please do keep the fixes coming if they affect speed measurably!

@chenglou chenglou closed this Sep 11, 2026
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.

Minor Optimisations

2 participants