News for hackers. Stuff that matters.
Re:PHP: why GOTO instead of recursion? by masklinn on Tuesday September 23, 2014 @12:48PM (#8356311)
> The only way to avoid that is to take it out of that pipeline (i.e. pre-optimise the PHP OPCodes before a request arrives).

Most production installations of PHP pretty much mandate a bytecode cache and the official distribution bundles one since 5.5[0], so the redundancy check is done once but the optimisation works for any request thereafter.

> PHP pre-compilers and other optimisers absolutely exist and are readily used (e.g. HipHop).

HHVM is a completely separate VM which does not use (or consume, or care for in any way) the Zend bytecode produced by the Zend VM. HHVM has its own separate and incompatible bytecode format called HHBC[1]. It's neither a "pre-compiler" nor an "optimiser" for the Zend VM.

[0] http://php.net/manual/en/opcache.installation.php

[1] https://github.com/facebook/hhvm/blob/master/hphp/doc/byteco...

Re:PHP: why GOTO instead of recursion? by chriswarbo on Tuesday September 23, 2014 @02:10PM (#8356996)
> HHVM is a completely separate VM... It's neither a "pre-compiler" nor an "optimiser" for the Zend VM.

"HHVM" is a VM. "HipHop [for PHP]" was a compiler[0], although it compiled down to C++ rather than Zend's VM (much like ShedSkin for Python[1])

[0] http://en.wikipedia.org/wiki/HipHop_for_PHP [1] http://en.wikipedia.org/wiki/Shed_Skin

Re:PHP: why GOTO instead of recursion? by Someone1234 on Tuesday September 23, 2014 @01:03PM (#8356423)
> It's neither a "pre-compiler" nor an "optimiser" for the Zend VM.

Nobody claimed otherwise.

Re:PHP: why GOTO instead of recursion? by masklinn on Tuesday September 23, 2014 @01:56PM (#8356857)
> Nobody claimed otherwise.

You provided HHVM as an example[0] of "PHP pre-compilers and other optimisers".

[0] that's literally what 'e.g.' means, it's an abbreviation for "exempli gratia", latin for "for example"

Re:PHP: why GOTO instead of recursion? by Someone1234 on Tuesday September 23, 2014 @02:23PM (#8357109)
Indeed I did, and indeed it is.

You tacked on "for the Zend VM." Which was not something I said.

I said:

> PHP pre-compilers and other optimisers absolutely exist and are readily used (e.g. HipHop).

You then said:

> HHVM is a completely separate VM which does not use (or consume, or care for in any way) the Zend bytecode produced by the Zend VM. HHVM has its own separate and incompatible bytecode format called HHBC[1]. It's neither a "pre-compiler" nor an "optimiser" for the Zend VM.

Which is really answering a point nobody made. It is just completely out of the blue. My post literally does not contain the term "Zend." Nor does it make any claim to what OPCode formats different things use (and really the only reason you could even talk about HipHop was that it was given as a unqualified example).

So to this:

> It's neither a "pre-compiler" nor an "optimiser" for the Zend VM.

Is answering a point nobody made. It is like me saying, "You're wrong, the White House isn't blue, it is white!" When no claims to the blueness of the White House were made by yourself.