Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Malloc is O(nĀ²) so it totally depend on how able you are to not do gradual allocation.


view as:

In most C libraries malloc() is O(log n), e.g. when implemented as balanced trees.

Argh. True, sorry for the brainfart.

Legal | privacy