Announcement

Collapse
No announcement yet.

PHP 7.0 RC1 Is Running Much Faster Than PHP5, But Still Not Beating HHVM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uid313
    replied
    Note:
    PHP's interpretation of "overloading" is different than most object oriented languages. Overloading traditionally provides the ability to have multiple methods with the same name but different quantities and types of arguments.

    Leave a comment:


  • Kazanir
    replied
    Originally posted by _ck_ View Post

    HHVM repo auth mode is a complete pain in the butt - it disables a great many things (create_function, etc.) and there is no way to update individual files

    And there is no way to turn off file stat in HHVM without turning on repo mode.
    It's still a very reasonable option for lots of production sites and is a big perf gain. The only things which are outright disabled are create_function, eval, and (ab)using Reflection to change the visibility of class properties.

    Anyway, I set this up (by passing an addition parameter to HHVM as an environment variable for the ini config) but I'm hitting out-of-memory errors. What other places in the script do I need to adjust the memory limit for these to run properly?

    Leave a comment:


  • _ck_
    replied
    Originally posted by Michael View Post
    No. does the repo authoritative mode even work for HHVM CLI apps?
    Wait, you are benchmarking PHP from the cli ?

    Is that even a realistic test? CLI doesn't have the opcache or the opcache optimization passes and has startup/shutdown delays.

    HHVM doesn't run the CLI like that, it is already in memory, so not a fair comparison.

    At least run PHP via php-fpm and just pass your command via cgi-fcgi

    Code:
    SCRIPT_NAME=(path+filename)  \
    SCRIPT_FILENAME=(path+filename) \
    REQUEST_METHOD=GET \
    cgi-fcgi -bind -connect /var/run/php-fpm.sock

    Leave a comment:


  • _ck_
    replied
    Originally posted by Kazanir View Post
    I'm curious (and maybe this will be in a forthcoming post) whether your testing has HHVM running in repo authoritative mode?
    HHVM repo auth mode is a complete pain in the butt - it disables a great many things (create_function, etc.) and there is no way to update individual files

    And there is no way to turn off file stat in HHVM without turning on repo mode.

    The solution in PHP with the zend opcache is much better, you can reduce or even turn off file stat but still disable individual files

    I wrote a control panel for the PHP opcache which will let you see/delete individual files as necessary:

    https://gist.github.com/ck-on/4959032 (screenshot https://ckon.wordpress.com/2013/03/2...panel-for-php/ )

    But you can just reduce file stat in PHP to once a minute via opcache.revalidate_freq in your php.ini

    Leave a comment:


  • Kazanir
    replied
    Originally posted by Michael View Post

    No. does the repo authoritative mode even work for HHVM CLI apps?
    It should I believe. I'm giving it a shot now and I'll let you know.

    Leave a comment:


  • Michael
    replied
    Originally posted by Kazanir View Post

    I'm curious (and maybe this will be in a forthcoming post) whether your testing has HHVM running in repo authoritative mode?
    No. does the repo authoritative mode even work for HHVM CLI apps?

    Leave a comment:


  • Kazanir
    replied
    Originally posted by phoronix View Post
    Phoronix: PHP 7.0 RC1 Is Running Much Faster Than PHP5, But Still Not Beating HHVM

    With PHP 7.0 RC1 having been released last week, I've spent a fair amount of time in the past few days trying out this first release candidate for the huge PHP 7 milestone...

    http://www.phoronix.com/scan.php?pag...RC1-Benchmarks
    I'm curious (and maybe this will be in a forthcoming post) whether your testing has HHVM running in repo authoritative mode?

    Leave a comment:


  • TheOne
    replied
    That way of overloading is nasty. Now that php supports type hints it should allow things like:

    function mine(int $test)
    function mine(string $test)

    But for this some one would need to standup and write an rfc.

    Leave a comment:


  • _ck_
    replied
    Originally posted by uid313 View Post
    PHP 7 is a great improvement of PHP 5 but still it has no support for decorators and method overloading.
    what? http://php.net/manual/en/language.oop5.overloading.php

    Leave a comment:


  • uid313
    replied
    PHP 7 is a great improvement of PHP 5 but still it has no support for decorators and method overloading.

    Leave a comment:

Working...
X