Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78266 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66890 invoked from network); 23 Oct 2014 10:32:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 10:32:17 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:52775] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/04-41150-039D8445 for ; Thu, 23 Oct 2014 06:32:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id F350524005D; Thu, 23 Oct 2014 06:32:13 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5xN0pQONPVXu; Thu, 23 Oct 2014 06:32:13 -0400 (EDT) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 4D0812400C7; Thu, 23 Oct 2014 06:32:13 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: Date: Thu, 23 Oct 2014 11:32:10 +0100 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <68229C26-4EEC-49DC-BA05-D5AC9728D1E8@ajf.me> References: <8C47FA53-0964-49C0-963C-332A936348A5@ajf.me> To: Dmitry Stogov X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC] Big Integer Support From: ajf@ajf.me (Andrea Faulds) > On 22 Oct 2014, at 21:12, Andrea Faulds wrote: >=20 > I ran the script several times, then took the results and put them = into Excel to produce the above table with its averages. >=20 > So common scripts are either unaffected, or will run ever-so-slightly = faster. Just to be clear, though, that didn=E2=80=99t tell the whole story. With = that number of iterations, there=E2=80=99s no speed difference that = isn=E2=80=99t 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=E2=80=99s just `for ($i =3D 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=E2=80=99s 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=E2=80=99t = understand x86 or x64 asm and am unable to rewrite it.=20 -- Andrea Faulds http://ajf.me/