summaryrefslogtreecommitdiff
path: root/ext/pgsql/php_pgsql.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2015-05-26 22:42:13 +1000
committerRemi Collet <remi@php.net>2015-07-28 18:38:23 +0200
commit305199a13163e246b909ef32880df032823bff05 (patch)
treea855e451319a524067c17d60bac3948d0fd96438 /ext/pgsql/php_pgsql.h
parenta581910a76276a152dae1953fdf3b25d8c9a8f85 (diff)
downloadphp-git-305199a13163e246b909ef32880df032823bff05.tar.gz
Improve performance of PowerPC64 ZEND_SIGNED_MULTIPLY_LONG
Detecting overflow with the XER is slow, partially because we have to clear it before use. We can do better by using a trick where we compare the high 64 bits of the result with the low 64 bits shifted right 63 bits. This is 7% faster on a POWER8 running a simple testcase: <?php function testcase($count = 100000000) { for ($i = 0; $i < $count; $i++) { $x = 1; $x = $x * 2; $x = $x * 2; $x = $x * 2; $x = $x * 2; } } testcase(); ?>
Diffstat (limited to 'ext/pgsql/php_pgsql.h')
0 files changed, 0 insertions, 0 deletions