Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter
| From: | Andi Gutmans | Date: | Thu, 09 Mar 2000 15:40:08 +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-16583@lists.php.net to get a copy of this message | ||
On Thu, 9 Mar 2000, Faisal Nasim wrote:
> <cut>
>
> > > Zend Guys, is there any possibility to rewrite
> > > the Zend engine in C++? It will make it alot
> > > cleaner and possibly with less bugs (and perhaps
> > > with more speed as well)!
> >
> > Perhaps with more speeed is a seriously over-optimistic statement,
>
> In some cases, I think, it will be faster because you have
> to write equivalent code which has already been done in C++,
> which is much more efficient and short.
>
> > 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.
>
> It can greatly reduce the overheads (if any) in hashes,
> maps, arrays etc. since they are just by a number of people
> world-wide, so the standard library for C++ is hyper-efficient!
The map<> and other STL classes don't do exactly what we need and
personally I don't love their interfaces too much. By the way, things like
hash maps and not tree maps aren't in the standard of STL and thus not
cross platform.
> C++ is support on almost (I don't know which doesn't) all platforms!
> the 'new' operator is more efficient than malloc().
Sure (NOT) as it usually wraps malloc() ;)
Anyway, I do like C++ a lot but well, Zend and PHP are in C and that'll
probably stay this way for a while, at least for PHP 4.0 & Zend 1.0.
Andi