Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Richard Lynch
On Wed, July 6, 2005 5:35 pm, Dan Rossi said: > > On 07/07/2005, at 10:26 AM, Richard Lynch wrote: >> "slow" switch > > You're a funny man Richard. So how is there overhead using callbacks if > you dont mind me asking ? I believe the callbacks imply a function stack, pushing/popping arguments, and

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Robert Cummings
On Wed, 2005-07-06 at 20:26, Richard Lynch wrote: > On Wed, July 6, 2005 3:08 pm, Robert Cummings said: > >> > Well i do find a performance issue running a heap of switches in PHP > >> so > >> > I could presume the same here. > >> > >> I believe that what's supposed to happen, in theory, is that th

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Dan Rossi
On 07/07/2005, at 10:26 AM, Richard Lynch wrote: "slow" switch You're a funny man Richard. So how is there overhead using callbacks if you dont mind me asking ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Richard Lynch
On Wed, July 6, 2005 3:08 pm, Robert Cummings said: >> > Well i do find a performance issue running a heap of switches in PHP >> so >> > I could presume the same here. >> >> I believe that what's supposed to happen, in theory, is that the >> compiler >> *CONVERTS* the swith statement to a bunch of

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Robert Cummings
On Wed, 2005-07-06 at 17:51, Richard Lynch wrote: > On Tue, July 5, 2005 10:55 pm, Dan Rossi said: > > > > On 06/07/2005, at 3:43 PM, Rasmus Lerdorf wrote: > > > >> The SWITCH vm was originally just a big switch(opcode) { case 1: ...; > >> case 2: ...' } It's a bit different now, but you can think

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Richard Lynch
On Tue, July 5, 2005 10:55 pm, Dan Rossi said: > > On 06/07/2005, at 3:43 PM, Rasmus Lerdorf wrote: > >> The SWITCH vm was originally just a big switch(opcode) { case 1: ...; >> case 2: ...' } It's a bit different now, but you can think of it in >> those terms. Decent compilers should theoreticall

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Richard Lynch
On Wed, July 6, 2005 2:26 am, Xuefer said: > but any manage to compile switch/goto vm? > CFLAGS=-g3 -O3 -Wall -march=pentium3 -pipe > it takes all my memory and bunch of swap without ending the compilation > gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) MAYBE try that "NO-INLINE"

Re: [PHP] PHP 5.1 vm

2005-07-06 Thread Xuefer
but any manage to compile switch/goto vm? CFLAGS=-g3 -O3 -Wall -march=pentium3 -pipe it takes all my memory and bunch of swap without ending the compilation gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Dan Rossi
On 06/07/2005, at 3:43 PM, Rasmus Lerdorf wrote: The GOTO mechanism uses a bit of a compiler trick known as "computed gotos" to try to make each one a very simple branch at the assembly level. It looks like this in C: That is, we can dynamically create a list of labels and then use a GOTO t

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Rasmus Lerdorf
Dan Rossi wrote: > > On 06/07/2005, at 5:05 AM, Jochem Maas wrote: > >> >> well I hadn't got a clue about this vm stuff but I read that >> there are CALL, GOTO and SWITCH [vm?] models implemented. according to >> 'Seb' CALL goes fastest. But I would assume that offering different vm >> model

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Dan Rossi
On 06/07/2005, at 5:05 AM, Jochem Maas wrote: well I hadn't got a clue about this vm stuff but I read that there are CALL, GOTO and SWITCH [vm?] models implemented. according to 'Seb' CALL goes fastest. But I would assume that offering different vm models meant that raw speed is not the only

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Jochem Maas
Rasmus Lerdorf wrote: Dan Rossi wrote: Continouing from my previous email I have been reading further on Seb's blogs regarding bechmarks with PHP5.1 and the different vm's that it compiles with. I dont particularly understand what the virtual machine is for, but he does meantion threading. Does

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Dan Rossi
On 06/07/2005, at 12:08 AM, Rasmus Lerdorf wrote: Dan Rossi wrote: Continouing from my previous email I have been reading further on Seb's blogs regarding bechmarks with PHP5.1 and the different vm's that it compiles with. I dont particularly understand what the virtual machine is for, but he

Re: [PHP] PHP 5.1 vm

2005-07-05 Thread Rasmus Lerdorf
Dan Rossi wrote: > Continouing from my previous email I have been reading further on Seb's > blogs regarding bechmarks with PHP5.1 and the different vm's that it > compiles with. I dont particularly understand what the virtual machine > is for, but he does meantion threading. Does this mean PHP5.1