Add randomness to GenIds (IMPORT) #3

Open
opened 2026-04-02 23:01:11 +00:00 by firepear · 0 comments
Owner

Add a unit test for GenIds which generates many (500? 1000? benchmark will help with determination) in a loop and tests for duplicates

Write a second implementation, which adds some randomness (two bytes?) before hashing

Unit test that version

Benchmark both

Add randomness until we can reasonably guarantee generation Ids with no dupes, based on GenId runtime as reported by benchmark (plus a pad, of course, as machines vary)

Add a unit test for GenIds which generates many (500? 1000? benchmark will help with determination) in a loop and tests for duplicates Write a second implementation, which adds some randomness (two bytes?) before hashing Unit test that version Benchmark both Add randomness until we can reasonably guarantee generation Ids with no dupes, based on GenId runtime as reported by benchmark (plus a pad, of course, as machines vary)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
firepear/petrel#3
No description provided.