View bench_utf8_regex_vs_u.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const UTF8_REGEX = '/\A(?: | |
[\x00-\x7F]++ # ASCII | |
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte | |
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs | |
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte | |
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates | |
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 | |
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 |
View bench_swoole.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file is part of the Tarantool Client package. | |
* | |
* (c) Eugene Leonovich <gen.work@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
View Zend_bench.php.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sapi/cli/php Zend/bench.php | |
------------------------ | |
Total 0.497 | |
$ sapi/cli/php -dextension_dir=`pwd`/modules -dzend_extension=opcache.so Zend/bench.php | |
------------------------ | |
Total 0.488 | |
$ sapi/cli/php -dextension_dir=`pwd`/modules -dzend_extension=opcache.so -dopcache.enable_cli=1 -dopcache.file_update_protection=0 -dopcache.jit_buffer_size=1M Zend/bench.php | |
------------------------ |
View exif_load_data.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -r '$exif=@exif_read_data("lc-bad-exif.jpg");print_r($exif);' > exif_read_data.log |
View jobserver.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queue = require('queue') | |
local function start(config) | |
box.once('jobserver:v0.1.0', function() | |
local tube = queue.create_tube('default', 'fifottl', {if_not_exists = true}) | |
end) | |
end | |
local function stop() | |
end |
View output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\SKM\Benchmarks\Serialization\BooleanSerializationBench | |
benchSerializeJSON I9 P0 [μ Mo]/r: 0.201 0.195 (μs) [μSD μRSD]/r: 0.011μs 5.29% | |
benchSerializeJSON I9 P1 [μ Mo]/r: 0.202 0.196 (μs) [μSD μRSD]/r: 0.011μs 5.61% | |
benchDeserializeJSON I9 P0 [μ Mo]/r: 0.386 0.385 (μs) [μSD μRSD]/r: 0.002μs 0.48% | |
benchDeserializeJSON I9 P1 [μ Mo]/r: 0.447 0.410 (μs) [μSD μRSD]/r: 0.107μs 23.81% | |
benchSerializeNative I9 P0 [μ Mo]/r: 0.221 0.218 (μs) [μSD μRSD]/r: 0.009μs 4.18% | |
benchSerializeNative I9 P1 [μ Mo]/r: 0.221 0.218 (μs) [μSD μRSD]/r: 0.009μs 4.21% | |
benchDeserializeNative I9 P0 [μ Mo]/r: 0.441 0.431 (μs) [μSD μRSD]/r: 0.019μs 4.31% | |
benchDeserializeNative I9 P1 [μ Mo]/r: 0.441 0.430 (μs) [μSD μRSD]/r: 0.019μs 4.26% |
View bench_concat_vs_interpol.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://blog.blackfire.io/php-7-performance-improvements-encapsed-strings-optimization.html | |
class Foobar | |
{ | |
public function getVal1() | |
{ | |
return rand(0, 1000); | |
} |
View bench_utf8_regex.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const UTF8_REGEX = '/\A(?: | |
[\x00-\x7F]++ # ASCII | |
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte | |
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs | |
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte | |
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates | |
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 | |
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 |
View bench_gettype_vs_is.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function switch_gettype($n, $value) { | |
for ($i = 0; $i < $n; ++$i) { | |
switch (\gettype($value)) { | |
case 'array': continue; | |
case 'string': continue; | |
case 'integer': continue; | |
case 'NULL': continue; | |
case 'boolean': continue; |
View bench_chr_vs_pack.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function pack_cc($n) { | |
for ($i = 0; $i < $n; ++$i) { | |
$num = \pack('CC', 0xcc, 200); | |
} | |
} | |
function chr_cc($n) { | |
for ($i = 0; $i < $n; ++$i) { |
NewerOlder