Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31388 invoked from network); 14 May 2014 05:58:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2014 05:58:03 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.220.182 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.182 mail-vc0-f182.google.com Received: from [209.85.220.182] ([209.85.220.182:43675] helo=mail-vc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/2C-53767-AE503735 for ; Wed, 14 May 2014 01:58:02 -0400 Received: by mail-vc0-f182.google.com with SMTP id la4so1811612vcb.13 for ; Tue, 13 May 2014 22:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=X54+TEdSdujmOeBDlGLXb+1Zkjv/4u9UvrmTgpSYzqk=; b=LoDfEkuY6B7HzuJBqZE0HXzPws6J3eaFcwve6vq/NLnXrkLtcpKQT0mbOOXLgxzQ52 Diba+1dPRj9FS4GaHHv3oIhqWQgCwco2fPRQqwWSd9kfH+w2VxTnkbY0X0BAw/nn4oRE wx1AdFCg3hbKPplJZMqIEq0CBFTpmaFcDSireZiZ3bXQ/K5ZLi6jF5Rey+5ogLBkbOmo 3IXmEVhlhXH8erpQ9YL4Ug79KSco0bZQyLuvhF3wjBQdkxCnHbjYynWFItp7Rt3/aSti 4Kt0rWuOr2ldnK/ers7bSjOznpi/hE/MAOwNI1bzc/xH32dG+jEUGHM8xsFKoX2vq2oc nQtw== X-Gm-Message-State: ALoCoQmWieeq/n4XxFa0WSDQOxZYGK5NcJkHHRkstiXf34UjdlzutwZ+bNl9Z4SYq6+qQyYA241s7RgxI3viBlq5bBj7zJmFtCsV/tU05reialDZquZfbAqqV0oxKhC7CH5kJ1qNOO5/ MIME-Version: 1.0 X-Received: by 10.221.37.1 with SMTP id tc1mr1343868vcb.32.1400047079947; Tue, 13 May 2014 22:57:59 -0700 (PDT) Received: by 10.52.111.71 with HTTP; Tue, 13 May 2014 22:57:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 May 2014 09:57:59 +0400 Message-ID: To: Pierre Joye Cc: Anatol Belski , PHP Internals Content-Type: multipart/alternative; boundary=001a11334c38de96c704f955dc2c Subject: Re: [PHP-DEV] [VOTE] [RFC] 64 bit platform improvements for string length and integer From: dmitry@zend.com (Dmitry Stogov) --001a11334c38de96c704f955dc2c Content-Type: text/plain; charset=UTF-8 Pierre, you developed a patch that will negatively affect every PHP application, just to use "modern" types... it's completely not necessary step for 64-bit support. As I said, I can support only part of your patch related to IS_LONG size. Thanks. Dmitry. On Wed, May 14, 2014 at 8: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. > > > I've just take a quick look over your initial patch for phpng at > > https://gist.github.com/weltling/a941d8cf6c731640b51f > > > > Actually, I would support only one idea from your patch - make IS_LONG to > > be 64-bit on _WIN64. > > Again. This patch is about clean, safe, standard implementation for > 64bit plaforms and modern compilers, by far not only for windows > (which has one more gain with this patch, portability). It brings a > lot of guards, as well as safe and clean implementations. This is > something we should have done a long time ago. PHP is only of the only > OSS language I know still relying on old types and using integer for > buffer length. This is a bad practice and a well known troubles > source. To reduce it to only windows is hardly a good move. > > > 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. > > But rejecting a safe and clean 64bit support for a prototype, even > promising, is wrong, in so many ways. See below. > > > Anyone may recompile phpng (with and without patch) and then get these > > number running > > $ gdb sapi/cli/php > >> p sizeof(zend_string) > > ... > > > > Can you imagine memory consumption difference on a large application? > > More memory usage => more CPU cache misses => worse performance. > > I can imagine a lot of things but at this point phpng is a very good > prototype with promising results. There is a good base idea and a lot > of changes in many places improving performance. However it is very > far away from being ready, APIs are very inconsistent and painful to > use (mix of zend_string and char* usage, remaing or removal which may > not make sense or make the code way too complicated). > > > and what are the advantages? strings and class names > 2GB? > > For me it's too big payment for useless feature. > > I do not think it is that useful for both of us to redo the > discussions about this patch and its goal. It is a necessary step for > 64bit support. It is also very hard to use a prototype, developed for > months privately and still being in very early pre-alpha/testing phase > as argument to reject these changes. However, as I told you, it would > be way better to do both together, for everyone. But you reject the > idea. We have to move forward to php-next and I do not think we can > afford to wait months until phpng is remotely usable or stable (at > least APIs wised). > > In any case, if the 64bit patch is accepted we will support you and > other with phpng as we always do, even before its RFC or proposal, > this is what I call cooperation and teamwork. > > Cheers. > Pierre > --001a11334c38de96c704f955dc2c--