Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25900 invoked from network); 5 Feb 2015 10:06:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 10:06:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=mapopa@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mapopa@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: mapopa@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:35578] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/8D-51979-FA043D45 for ; Thu, 05 Feb 2015 05:06:40 -0500 Received: by mail-la0-f53.google.com with SMTP id ge10so1628549lab.12 for ; Thu, 05 Feb 2015 02:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fq4FRyBwpVtPaMkhR2OdavpUtiVfn2wha9GmFO3foLo=; b=aeo1yJF5dgoFTwNm23hOc2tHyaC1/5H9kst6+E8JluoEK8Vbqb79JNMgV6ExbTVYES eabvcftLcqRigszzfGIIgS3//eOwqJV22LrZbBG0YIXsLZAjJCtm+Jjm1oMCDUR9dDzs OQ8Q9Di7PmeoZSfrZwz01rZtCwR1mi8YyEJ0iJ8+lNpQtEW/5xrFHYZfeSo+18S7761z hmM5wvehB8AylUpUMP3itctyYs4VKHysLEylqVjikFZqD6gwqeRDRzuxo3QxDHRc4jra jvL3eQv0mx7fMAFgoL3mGzx8lxXfdxCR4o9TWmk/5atPJughhCGTvNnzzMuEu73HyLe6 8dlA== MIME-Version: 1.0 X-Received: by 10.152.25.165 with SMTP id d5mr2477255lag.43.1423130796341; Thu, 05 Feb 2015 02:06:36 -0800 (PST) Received: by 10.112.13.39 with HTTP; Thu, 5 Feb 2015 02:06:36 -0800 (PST) In-Reply-To: <1C2ED70C-72A0-4513-A134-5DAE4CCA5B3D@ajf.me> References: <8C47FA53-0964-49C0-963C-332A936348A5@ajf.me> <54D00C40.8060907@lsces.co.uk> <54C5DC93-9600-4EE2-BF06-7BF10FC6AD5C@ajf.me> <54D08D50.5050407@lsces.co.uk> <1C2ED70C-72A0-4513-A134-5DAE4CCA5B3D@ajf.me> Date: Thu, 5 Feb 2015 12:06:36 +0200 Message-ID: To: Andrea Faulds Cc: Lester Caine , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=089e0160bbe295c090050e54757d Subject: Re: [PHP-DEV] [RFC] Big Integer Support From: mapopa@gmail.com (marius adrian popa) --089e0160bbe295c090050e54757d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I agree with Andrea's points , also GMP is also used in ruby 2.1 with good results https://bugs.ruby-lang.org/issues/8796 ps: LibTomMath seems to be used in firebird also On Tue, Feb 3, 2015 at 4:03 PM, Andrea Faulds wrote: > Hi Lester, > > > On 3 Feb 2015, at 08:56, Lester Caine wrote: > > > > On 02/02/15 23:50, Andrea Faulds wrote: > >>> Since a clean 64bit build of PHP does not need anything other than > >>>> 'integer' to support 64bit BIGINT SQL numbers, loading 32bit builds > with > >>>> an overly heavy solution is just not right! > >> I don=E2=80=99t see how it=E2=80=99s =E2=80=9Coverly heavy=E2=80=9D. B= ear in mind that several > extensions (not just ext/gmp) already require GMP anyway. > > > > libgmp.so is 538.6kb > > gmp.so add a further 242.1kb > > > > You will have to elaborate on what else is reliant on it for a normal > > PHP build. > > cURL and other things that use GnuTLS: > https://bugs.php.net/bug.php?id=3D63595 > > Also, the bigint branch doesn=E2=80=99t require ext/gmp to be enabled. > > > I've only JUST installed any of it on the development machine > > to get those sizes and gmp extension is not yet enabled. > > Well, you don=E2=80=99t actually need GMP anyway. The patch also bundles = a > lightweight, pure C89 bigint library called LibTomMath which will be buil= t > if you don=E2=80=99t ask to use GMP explicitly. It=E2=80=99s nowhere near= as fast as GMP, > but it=E2=80=99s liberally-licensed, lightweight, etc. > > > THAT just seems rather heavy to just support a pair of 32bit integers > > that the database extension has already loaded and is handling as a > > single object ... on a 32bit platform. > > Even just a =E2=80=9Cpair of 32-bit integers=E2=80=9D requires a signific= ant effort. You > need to bundle some sort of library to deal with it. > > >>>> 'longint' only needs an > >>>> extension to provide it, which can then be replaced by properly > crafted > >>>> code for devices that already have 256bit and better maths capabilit= y > >>>> anyway. > >> GMP provides high-performance, optimised SIMD assembly implementations > for most platforms. > > > > Yes GMP does have some ARM support, but it may not be the most economic > > solution. ARM does have it's own more compact libraries for the same > > functionality and replacing the 780kb gmp option by something smaller > > should be an option, rather than making the rest of the core dependent > > on it. > > If you wish to go to the hassle of adding a bigint backend specifically > optimised for ARM, you=E2=80=99re free to. > > But I don=E2=80=99t consider 0.25MB extra to be such a problem in practic= e. The > PHP binary is already huge, and every system running PHP will have ample > memory. > > Thanks. > > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --089e0160bbe295c090050e54757d--