News for hackers. Stuff that matters.
Re:Data Structures in the Fleet Editor by moonchild on Tuesday February 22, 2022 @05:51PM (#30435003)
> amortized growth of a large buffer, which will happen max log n times in a buffer of size n

You can do better than log if you care to; just grow the buffer more quickly. It's just that exponential growth tends to work pretty well (and, notably, amortizes the overhead of copying such that it is O(1)). Also: people tend to take breaks when typing, so you can asynchronously try to grow the buffer when it is close to full.

There are no comments on this comment yet.