Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter

From: Date: Thu, 09 Mar 2000 16:10:53 +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-16587@lists.php.net to get a copy of this message
Andi Gutmans wrote: > > On Thu, 9 Mar 2000, Andrei Zmievski wrote: > > > On Thu, 09 Mar 2000, Zeev Suraski wrote: > > > Perhaps with more speeed is a seriously over-optimistic statement, > > > Switching to C++ will almost definitely reduce the performance very very > > > significantly (I can't say for sure, but it'll probably be in the range of > > > 10's of %s). Also, C++ is much less portable than C, so we're not > > > interested in switching languages. > > > > Zeev, you can't just make such a blanket statement regarding the > > performance of C++ code. I'm not suggesting Zend needs to be in C++, but > > well-written C++ code is pretty damn fast. > > Not when you're talking about the kind of optimizations we did where we > tried to spare every Assembly code possible (and I'm sure there will be > some more such passes when things settle down). > If you'd write Zend in the correct OOP way you'd have a lot of virtual > functions and stuff like that which would actually be slower than the way > it is written now. Of course, you could write C++ in a C'ish way but then > you wouldn't gain much. <cut> 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! 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)... Thanks! Faisal

« previous php.dev (#16587) next »