Extensive reallocations in strtr, str_replace and implode

php.internals

Wojtek Meler

20 years ago
Working with large strings and arrays (few MB) php does large amount of reallocs. We can reduce them by preallocating memory when output size can be predicted. How about applying such patch? It would be even better if smart strings expose better allocation api than smart_str_alloc. Regards, Wojtek Meler

Wojtek Meler

20 years ago
Missing parentheses... Regards, Wojtek Meler