treffynnon / Benchmark-PHP-HHVM-Zephir

Benchmark PHP, HHVM and Zephir
http://simonholywell.com/post/2014/02/hhvm-vs-zephir-vs-php-the-showdown.html
BSD 3-Clause "New" or "Revised" License
57 stars 10 forks source link

[JPHP] Add test #9

Closed treffynnon closed 7 years ago

treffynnon commented 10 years ago

https://github.com/dim-s/jphp

treffynnon commented 10 years ago
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt-get install gradle
treffynnon commented 10 years ago

Looking for a pull request on this one as I don't have any more time for writing this benchmarking suite. @dim-s any interest?

dim-s commented 10 years ago

Hi, I have no time for this, but I can give some tips for testing JPHP:

// global scope
for($i = 0; $i < 100500; $i++){
    /// ...
}

// local scope - ~2x faster than in the global scope
funtion test(){
    for($i = 0; $i < 100500; $i++){
       // ...
    }
}
test();
for ($i = 0; $i < 100500; $i++){
    // it will be calculated only one time at compile-time
    $x = cos(1) + 3 / 4 . ("foobar" . __FILE__); 
}
treffynnon commented 7 years ago

Closing as won't fix