Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 27, 2025

Replace all instances of !0 (bitwise NOT of 0, which equals u32::MAX) with a named constant INVALID_ID to make the code more readable and self-documenting. The constant clearly indicates its purpose as a sentinel value for missing source or name IDs in tokens.

🤖 Generated with Claude Code

Replace all instances of `!0` (bitwise NOT of 0, which equals u32::MAX) with a named constant `INVALID_ID` to make the code more readable and self-documenting. The constant clearly indicates its purpose as a sentinel value for missing source or name IDs in tokens.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@graphite-app
Copy link

graphite-app bot commented Sep 27, 2025

How to use the Graphite Merge Queue

Add the label merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 27, 2025

CodSpeed Performance Report

Merging #175 will improve performances by 2.35%

Comparing refactor/replace-sentinel-value (d43fe3e) with main (ad4f62c)

Summary

⚡ 1 improvement
✅ 4 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
generate_lookup_table 1.3 µs 1.2 µs +2.35%

@Boshen Boshen merged commit 643973b into main Sep 27, 2025
7 checks passed
@Boshen Boshen deleted the refactor/replace-sentinel-value branch September 27, 2025 12:33
This was referenced Sep 27, 2025
@overlookmotel
Copy link
Member

Nice. Out of interest, is this something you asked Claude to do, or something that he suggested doing himself based on a broad prompt like "look for improvements you can make"?

@Boshen
Copy link
Member Author

Boshen commented Sep 28, 2025

Nice. Out of interest, is this something you asked Claude to do, or something that he suggested doing himself based on a broad prompt like "look for improvements you can make"?

I told it to figure out what's !0 and then replace it.

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.

3 participants