Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter
| From: | Andi Gutmans | Date: | Thu, 09 Mar 2000 17:53:33 +0000 |
| Subject: | Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16589@lists.php.net to get a copy of this message | ||
On Thu, 9 Mar 2000, Faisal Nasim wrote:
> Thank you for the info. I know that you guys know what you have done,
> and you must have carefully thought which language you will go with...
> Personally, I think it *works* great as the way it is now. Just wanted
> to know the reason for choosing to write your own hash and stuff
> when you could have easily used C++ for the job!
The hash is probably one of the main things we would have been able to use
STL with. It's a super hash which can do a zillion things :) Nah really,
it's very specialized and tailored for PHP and symbol tables.
> BTW, Stroustrup book claims that new is faster than malloc....
> I assume it doesn't wrap to malloc() but does it internally
> as malloc() would do (but a bit more efficiently)...
Well no matter how you look at it, dynamic allocation is quite slow both
with malloc() and new(). This is why we try and cache memory in PHP 4 in
order to avoid at least some of the performance hit.
Andi