Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26688 invoked from network); 14 May 2014 05:30:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2014 05:30:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:52001] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/2B-53767-A8FF2735 for ; Wed, 14 May 2014 01:30:50 -0400 Received: by mail-ob0-f175.google.com with SMTP id wo20so1573741obc.6 for ; Tue, 13 May 2014 22:30:48 -0700 (PDT) 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=ycVQCskzI+QGhKHXdTWdfk5V6mn1ckr/ttypZ+Wz32o=; b=0OxUKG8zfFEU6qyycxJe5VPlAymwoRynAt0Bq0htOtQWmiCVXv+GYxbSGytrpMPu89 x3udisN4oFOJZef+Sl4gwpfzYzuJL4FNTeni8IA0dirK9KgKZzGTh3sUheoi4FUIqtdc 7OF7ZLFeT5bU++NfOC5SBLy92tJLMXG0UPFhldPZ08tyDMZ34AFAU7zx7X6yo8fWkAe9 nHGj/+/D1YQeLfWyx6qNaIyx4y8K381bZ3bniwGmcKeQ2mj47J7nnuVEhb6OFTqELSzO SddzPFagf1ZBN2fdydJ+CkeamtJmKFUkSMJval1PUH3ft+s+L97mmcpaqh0B3W00yUh8 VElg== MIME-Version: 1.0 X-Received: by 10.60.69.71 with SMTP id c7mr102642oeu.82.1400045448302; Tue, 13 May 2014 22:30:48 -0700 (PDT) Received: by 10.182.165.69 with HTTP; Tue, 13 May 2014 22:30:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 May 2014 07:30:48 +0200 Message-ID: To: Pierre Joye Cc: Dmitry Stogov , Anatol Belski , PHP Internals Content-Type: multipart/alternative; boundary=001a1133194a9d965404f9557b35 Subject: Re: [PHP-DEV] [VOTE] [RFC] 64 bit platform improvements for string length and integer From: nikita.ppv@gmail.com (Nikita Popov) --001a1133194a9d965404f9557b35 Content-Type: text/plain; charset=UTF-8 On Wed, May 14, 2014 at 6:44 AM, Pierre Joye wrote: > hi Dmitry. > > On Wed, May 14, 2014 at 12:52 AM, Dmitry Stogov wrote: > > Anatol, > > > > We discussed your patch in private and I showed you the big penalty it > > makes... > > We discussed how we could best cooperate to get phpng and this patch > together to ease everyone's work. > > > I really, don't see, what do you like to achieve initiating voting right > > after that. :( > > Moving forward as you rejected the whole idea for no good reason or > based on numbers that cannot be taken as valid as this stage. > > > Your zend_size_t related changes, in my opinion, makes little sense and > > actually makes more harm. I recompiled phpng with your patch on Linux > > x86_64 and got the following numbers: > > > > zend_string size increased from 24 to 32 bytes > > HashTable size increased from 56 to 72 bytes > > zend_op_array size increased from 248 to 264 bytes > > zend_class_entry size increased from 512 to 568 bytes > > size of each opcode sizeof(zend_op) from 48 to 56 bytes > > These numbers cannot be taken as valid or seriously at this stage. > Restructuring these structs will certainly reduce the delta. I did not > have the time to analyze phpng possible other improvements but I will > do it soon, and will also check with other people from the compiler > team if we can improve it a bit more as well. > Sorry, what did I miss here? Why cannot the phpng numbers be taken as "valid"? The very same issue also exists in our current implementation. In phpng the relative hit is just larger, because the structures are more optimized. I think you shouldn't dismiss Dmitry's point just like that. Having support for 64 bit integers on Windows and other LLP64 architectures - that's great. Making string lengths unsigned - that's great as well. But supporting strings larger than 4G or arrays with more than 4 billion elements - that does not seem very useful and unlike the other two changes, hurts memory usage. I wonder how many people would prefer having lower memory usage over having the ability to create arrays with 4 billion elements. Independently of that: In a lot of the previous discussion people have many, many, many times asked that this patch be implemented without all those macros renames and zpp changes. I still have a hard time seeing the benefit of doing that. The zpp changes also conflict with phpng, because S has a different meaning (and imho for no good reason - it could just as well stay at s). Nikita --001a1133194a9d965404f9557b35--