On Tue, 5 Oct 2004, Nuno Lopes wrote:
> > On Tue, 5 Oct 2004, Nuno Lopes wrote:
> >
> >> +PHP_ARG_WITH(zend-vm,[virtual machine dispatch method],
> >> +[ --with-zend-vm=TYPE Sets virtual machine dispatch methos. Type is
> >> + one of "CALL" (default), "SWITCH" or "GOTO"],
> >> CALL, no)
> >>
> >>
> >> May I ask whats the difference between them, and which should I
> >> choose?...
> >
> > If you don't know, don't use it :)
>
> OK, great! One more undocumented feature for PHP...
IMO it's a bit too soon to document something like this yet, as there is a posibility that it might change soon. There are plenty of other documentation bugs to be fixed ;-)
Yes, I agree with Derickk that it's too soon to document. In general the explanation is: CALL - Uses function handlers for opcodes. SWITCH - Uses switch() statement for opcode dispatchment GOTO - Uses goto for opcode dispatchment (threaded opcodes architecture).
GOTO is usually (depends on CPU and compiler) faster than SWITCH which tends to be slightly faster than CALL.
CALL is default because it doesn't take very long to compile as opposed to the other two and in general the speed is quite close to the others.
Andi
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
