|
|
|
|
|
by cperciva
3805 days ago
|
|
The classic example of frequent reallocs is this perl code: $x .= $_ while (<>);
I believe this has been fixed now, but perl used to realloc for each append operation, which resulted in O(N^2) time complexity if realloc didn't operate in-place. |
|