Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63247 invoked from network); 3 Feb 2015 20:29:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2015 20:29:59 -0000 Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.175 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.223.175 mail-ie0-f175.google.com Received: from [209.85.223.175] ([209.85.223.175:59276] helo=mail-ie0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/09-20608-6CF21D45 for ; Tue, 03 Feb 2015 15:29:58 -0500 Received: by mail-ie0-f175.google.com with SMTP id ar1so28149534iec.6 for ; Tue, 03 Feb 2015 12:29:55 -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=OGuxHnmRvJUZf1GhypxR6jRxvplvALgBPq+uRxByIdE=; b=OY1AjRHpbva2ah7YZHeXsRINIXZProcD49uRHxfx9/KnR9YUK2e4eScRonrpIOl1+y xDn+PWhPZsh4zNNCUi5lfEsut/TLDkLhiGqKtkSS+je4LWSCoiQuTxBQTpZmMZ5qs33m euJn0Z73Wjo5uWFClzZ+N3ojvNCRlGZUs2SmGt6AFoppUlqRedpbtKuCguiHEFOmrR5Q Siz3Fz/Ir8J35ub/N7dbv5Kox7/00fz3Z0bUtNmkjvg4VAippzYeOe78UqnFKJ01lPvf nucarvDMq/JnxWUW4V1NKt+uf1tita5cK7AOQypbswl3WHVdlxHQqsluVQy7QwPKOnZ8 BWmA== MIME-Version: 1.0 X-Received: by 10.42.95.193 with SMTP id g1mr5594384icn.57.1422995395315; Tue, 03 Feb 2015 12:29:55 -0800 (PST) Received: by 10.50.248.45 with HTTP; Tue, 3 Feb 2015 12:29:55 -0800 (PST) In-Reply-To: <06F175EB-D44A-445F-8015-8421C7C12F39@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> <54D0DFE5.9030602@lsces.co.uk> <06F175EB-D44A-445F-8015-8421C7C12F39@ajf.me> Date: Tue, 3 Feb 2015 14:29:55 -0600 Message-ID: To: Andrea Faulds Cc: Lester Caine , PHP Internals Content-Type: multipart/alternative; boundary=20cf30363fdb0e0d6b050e34efe7 Subject: Re: [PHP-DEV] [RFC] Big Integer Support From: pencap@gmail.com (Mike Willbanks) --20cf30363fdb0e0d6b050e34efe7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Feb 3, 2015 at 10:44 AM, Andrea Faulds wrote: > > > On 3 Feb 2015, at 14:49, Lester Caine wrote: > > > > On 03/02/15 14:03, Andrea Faulds wrote: > >> But I don=E2=80=99t consider 0.25MB extra to be such a problem in prac= tice. The > PHP binary is already huge, and every system running PHP will have ample > memory. > > > > Yes one approach is 'computers are getting faster with lots of memory' > > ... and for servers this is not a problem ... they will more than > > likely be 64bit anyway! But for smaller embedded devices php *IS* > > becoming an option so I don't have to program in C or something else, > > and then we look to strip everything that does not need to be present. > > Sure, but I don=E2=80=99t think we shouldn=E2=80=99t cripple the language= merely for the > sake of really low-end embedded devices. Also, I=E2=80=99m not convinced = that the > overhead, at least in terms of file size, is really that big of an issue. > > Just for you, I=E2=80=99ve gone and compiled the bigint branch (with LibT= omMath) > and master on my machine: > > $ ls -l php7-* > -rwxr-xr-x 1 ajf staff 6400408 3 Feb 16:39 php7-bigint > -rwxr-xr-x 1 ajf staff 6248920 3 Feb 16:42 php7-master > > The difference is a mere 151488 B, or 151 KB. > > Is that really so bad? > I would take 1MB if I had to so that I could have this in core. I work with them everyday and the pain of having to deal with them as strings is a royal pain. It would only become worse if this does not get into core and type hints do as the mess would be drastic for any systems that must handle 64bit integers across the board. It's not useful to have to always go to gmp to handle numbers of this type. It is simply not realistic. On top of that, we use embedded systems everyday. I have 6 devices sitting in front of me right now. Think of a GUID whereas they have large integer internal representations and a hex representation for human readable. On top of this, we also have beaglebones and raspberry pi's that have internal memory capacities where this easily fits and flash storage. There is no reason that this feature should be held back for embedded systems or even system on a chip. Regards, Mike --20cf30363fdb0e0d6b050e34efe7--