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

From: Date: Thu, 09 Mar 2000 15:43:46 +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-16584@lists.php.net to get a copy of this message
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. I like C++ a lot, and I find OOP design very interesting, but if you design well in C++ vs. C you'll definitely be faster in C. However, doing a good design in C is much harder than in C++ IMO. And OOP design is quite a difficult subject itself. Andi

« previous php.dev (#16584) next »