Extensive reallocations in strtr, str_replace and implode

From: Date: Mon, 20 Feb 2006 10:41:08 +0000
Subject: Extensive reallocations in strtr, str_replace and implode
Groups: php.internals 
Request: Send a blank email to internals+get-21955@lists.php.net to get a copy of this message
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

« previous php.internals (#21955) next »