Skip to content

lockfree map, used to make Cache.Count domain safe - #72

Merged
c-cube merged 3 commits into
sc/some-domain-safetyfrom
sc/fast-lockfree-map
Oct 6, 2026
Merged

c-cube merged 3 commits into
sc/some-domain-safetyfrom
sc/fast-lockfree-map

Conversation

@c-cube

@c-cube c-cube commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@c-cube
c-cube added this pull request to stack #73 October 1, 2026 15:18
@c-cube
c-cube force-pushed the sc/fast-lockfree-map branch from 6c704f8 to 7dc1b13 Compare October 1, 2026 19:45
@c-cube
c-cube marked this pull request as ready for review October 2, 2026 01:23
"high bits", { H.equal = Int.equal; hash = (fun k -> Hashtbl.hash k lsl 32) };
]

type op = Get_or_create of int * int | Find of int | Mem of int | Clear

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not so much a review as a question:
would this kind of test be better expressed as a state-machine test? (with e.g. qcheck-stm)

it seems you are re-encoding part of the logic. i think it's fine bc there isn't too much logic to encode and not too much boilerplate to go along with it. it's sometimes better to go for the test framework you are familiar with. i was just curious if there's another reason for the choice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is claude, tbh, but in containers I tend to do the same (list of ops, easy to shrink, grug style)

@c-cube
c-cube force-pushed the sc/fast-lockfree-map branch 2 times, most recently from d1afd90 to 491656b Compare October 6, 2026 16:13
@c-cube
c-cube merged commit e8281d5 into master Oct 6, 2026
2 checks passed
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.

2 participants