News for hackers. Stuff that matters.
Re:Fast, simple, hard real time allocator for Rust by fragmede on Thursday May 02, 2024 @04:56PM (#40241274)
This is O(n) because you're still doing the i < size comparison, even though you've moved it out of the for loop.
Re:Fast, simple, hard real time allocator for Rust by markisus on Thursday May 02, 2024 @11:12PM (#40243654)
For almost all n (size), the function runs for MAX_SIZE steps, since almost all numbers are greater than MAX_SIZE. And it never runs for more than MAX_SIZE steps.