Re: [VOTE] 64 bit platform improvements for string length and integer
| From: | Christopher Jones | Date: | Fri, 31 Jan 2014 16:29:20 +0000 |
| Subject: | Re: [VOTE] 64 bit platform improvements for string length and integer | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71883@lists.php.net to get a copy of this message | ||
On 1/31/14 4:10 AM, Jakub Zelenka wrote:
On Fri, Jan 31, 2014 at 11:57 AM, Pierre Joye <pierre.php@gmail.com <mailto:pierre.php@gmail.com>> wrote:A Linux benchmark to verify the impact would have been useful. Chris -- christopher.jones@oracle.com http://twitter.com/ghrd Free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.htmlOn Jan 31, 2014 12:54 PM, "Jakub Zelenka" <bukka@php.net <mailto:bukka@php.net>> wrote:- before the patch: 8B (ptr) + 4B (int) + 4B (alignment) = 16B - after the patch: 8B (ptr) + 8B (size_t) = 16B That seems like no increase to me. Is there anything else that I missed?size_t will be 8 bytes on most architecture. That's 4 bytes more than what we have now for buffer length (using int).Yeah but the final size of zval is the same. With int the memory is aligned and the extra 4 bytes are not used. It means that the size for zvalue_value was 16B on 64bit anyway (see above). On 32bit the size of size_t and int is 4 bytes so there is no difference - 8 bytes for zvalue_value. Regards Jakub