I’m going crazy, but if this compiles at all I bet it generates the same machine code when compiled with each line reversed.
- 0 Posts
- 2 Comments
Joined 2 years ago
Cake day: June 10th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Really enjoyed the read. Thanks for sharing. I’m surprised by the random page implementation.
Usually in a database each record has an integer primary key. The keys would be assigned sequentially as pages are created. Then the “random page” function could select a random integer between zero and the largest page index. If that index isn’t used (because the page was deleted), you could either try again with a new random number or then march up to the next non empty index.