Hi Andrea,
The synthetic benchmarks are not always reflect the impact on real-life
performance.
Unfortunately, I wasn't able to run any big real-life apps with your bigint
branch, because it misses support for commonly used extensions
(ext/session, ext/json, ext/pdo).
I ran bench.php and it's a bit slower with bigint.
master 1.210 sec
bigint 1.330 sec
I also measured the number of executed instructions using valgrind
--tool=callgrind (less is better)
master 1,118M
bigint 1,435M
May be part of this difference is caused by missing latest master
improvements, but anyway, introducing new core type, can't be done for free..
I also was able to run qdig, and it showed about 2% slowdown.
[master] $ sapi/cgi/php-cgi -T 1000 /var/www/html/bench/qdig/index.php >
/dev/null
Elapsed time: 3.327445 sec
[bigint] $ sapi/cgi/php-cgi -T 1000 /var/www/html/bench/qdig/index.php >
/dev/null
Elapsed time: 3.382823 sec
It would be great to measure the difference on wordpress, drupal, ZF...
Thanks. Dmitry.
On Thu, Oct 23, 2014 at 2:32 PM, Andrea Faulds <[email protected]> wrote:
>
> > On 22 Oct 2014, at 21:12, Andrea Faulds <[email protected]> wrote:
> >
> > I ran the script several times, then took the results and put them into
> Excel to produce the above table with its averages.
> >
> > So common scripts are either unaffected, or will run ever-so-slightly
> faster.
>
> Just to be clear, though, that didn’t tell the whole story. With that
> number of iterations, there’s no speed difference that isn’t within the
> margin of error. However, up the iterations by 100x and the bigint branch
> is consistently very slightly slower. Remove the body of the loop so it’s
> just for ($i = 0; $i < 100000000; $i++) {}
and the bigint branch is
> consistently very slightly faster. No idea why either of these is the case.
>
> So, apparently, the bigint branch both makes things slower and makes them
> faster! But it’s not a big enough difference for me to be worried about it.
> The differences that do exist might disappear if the fast_* functions can
> have their inline asm rewritten and be uncommented. Currently, master has
> custom asm for these, while the bigint branch has to use the probably
> slower C implementations because I don’t understand x86 or x64 asm and am
> unable to rewrite it.
>
> --
> Andrea Faulds
> http://ajf.me/
>
>
>
>
>