Re: [RFC] 64 bit platform improvements for string length and integer

From: Date: Sat, 25 Jan 2014 14:54:47 +0000
Subject: Re: [RFC] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-71560@lists.php.net to get a copy of this message
Hi Lester, On Sat, January 25, 2014 13:32, Lester Caine wrote: > Anatol Belski wrote: > >> On Fri, January 24, 2014 12:29, Dmitry Stogov wrote: >> >>>> I would be glad t see any 64-bit performance related improvements. >>>> >>>> >>>> BTW: the performance degradation is expected. Each pointer is >>>> 64-bit >>>> instead of 32-bit => more memory consumption => more CPU cache >>>> pressure => more CPU cache misses. >>>> >>>> On the other hand x86-64 uses more CPU registers, MMX, SSE, passes >>>> arguments in registers, so it's usually faster on small tasks that >>>> keep working set in CPU caches. >>>> >> Wouldn't then the small parts improve the whole? Fixing the small cases >> laying on the surface like implicit 32 vs 64 bit type conversions, >> better struct packing and similar measures would already contribute to >> more efficient processor and memory usage. That would probably turn many >> things even more upside down though:) As yep, potentially 64 bit should >> be faster, so it's worth a try to lean PHP towards. >> >> Especially as you welcome it, I would put the topic on my todo after >> properly finishing this RFC. Besides potential improvement that's also >> an exciting matter. > > Much of the 'improved performance' provided by later versions of windows > is down to faster processors to hide the extra bloat created. They have > adopted having a 32bit version and a 64bit version. Making PHP super > efficient on 64bit processors would be useful, but it still misses the > point of being able to fall back gracefully to run on 32bit machines? Or > is now the time to introduce the same differentiation in all builds of > PHP? It is built for the platform? > > > The main problem here is that changing things to be more 64bit efficient > could then make things even worse on 32bit? Yes we need to be modernising, > but telling users to 'read the source code' to find out where functions > are now returning 64 bit values rather than 32bit ones is not the right > approach? this RFC has no plans to discriminate 32-bit platforms, but merely to improve the 64-bit ones. 32-bit platforms are nowadays mature, consistent and well supported, whereas 64-bit platforms have much more non exhausted potential and still luck on proper software ports at many places. Regards Anatol

« previous php.internals (#71560) next »