Re: [PHP-DEV] .= operator slowness From: Andi Gutmans (andi <email protected>)
Date: 06/04/98

At 00:35 04/06/98 -0400, Rasmus Lerdorf wrote:
>> Look at the 3.1 wishlist...
>
>Yeah, but it just says:
>
>* Improve string performance by using smarter memory allocation methods
>
>there is no indication of what these smarter memory allocation methods
>might be. I was simply suggesting one.

A tiny enhancement which we could add to 3.0 before it comes out (not sure
why we didn't do it before) is to use erealloc() instead of emalloc().
Often erealloc() doesn't allocate a new memory area but increases the old
one which means the memcpy() is saved. I think this is the best idea, at
least until 3.1.

Andi

---
Andi Gutmans <andi <email protected>>
Computer Science, Technion, Israel Institute of Technology
Web: http://andi.il.eu.org/ ICQ: 1568297 PGP: finger andi <email protected>
KeyID 62F5661D  fingerprint = 1A 87 A2 10 2F EF EF AB 47 E0 4D 42 F5 B5 49
AD