Skip to content

Optimize Ulid fallback equality check with branchless XOR comparison.#43

Merged
Seramis merged 1 commit intoByteAether:mainfrom
Seramis:equals_xor-compare
May 6, 2026
Merged

Optimize Ulid fallback equality check with branchless XOR comparison.#43
Seramis merged 1 commit intoByteAether:mainfrom
Seramis:equals_xor-compare

Conversation

@Seramis
Copy link
Copy Markdown
Member

@Seramis Seramis commented May 6, 2026

Description

| Method | Mean      | Error     |
|--------|----------:|----------:|
| AND    | 0.0001 ns | 0.0004 ns |
| XOR    | 0.0019 ns | 0.0028 ns |

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please specify): Performance optimization

Checklist

  • The PR is submitted to the correct branch (main).
  • My code follows the project's coding style. (.editorconfig)
  • I have commented my code, particularly in hard-to-understand areas and public interfaces.
  • I have added or updated tests for the changes I made.
  • All new and existing tests passed.
  • I have updated the documentation where applicable.

@Seramis Seramis self-assigned this May 6, 2026
@Seramis Seramis merged commit 53967a3 into ByteAether:main May 6, 2026
5 checks passed
@Seramis Seramis deleted the equals_xor-compare branch May 6, 2026 11:39
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.

1 participant