On Tue, Feb 3, 2015 at 10:44 AM, Andrea Faulds <a...@ajf.me> wrote: > > > On 3 Feb 2015, at 14:49, Lester Caine <les...@lsces.co.uk> wrote: > > > > On 03/02/15 14:03, Andrea Faulds wrote: > >> But I don’t consider 0.25MB extra to be such a problem in practice. 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’t think we shouldn’t cripple the language merely for the > sake of really low-end embedded devices. Also, I’m not convinced that the > overhead, at least in terms of file size, is really that big of an issue. > > Just for you, I’ve gone and compiled the bigint branch (with LibTomMath) > 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