Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90069 invoked from network); 24 Jan 2014 11:29:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 11:29:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 74.125.82.178 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:39180] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/9C-39789-FAE42E25 for ; Fri, 24 Jan 2014 06:29:52 -0500 Received: by mail-we0-f178.google.com with SMTP id t60so2461823wes.23 for ; Fri, 24 Jan 2014 03:29:49 -0800 (PST) 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=ZaWWAXjqznKpXDFdJ4y7xkY5Ut5+ochYo6z3U/H/QWU=; b=VYeTHB9NS8U4GcT1L1JlUhKJ9MbKt2BQjdi59MwPdHYsxhDN/XSAJUGSHA5myUZ9Jo LVcuSD3po8bcNJpVWKskn9F958ctwVuRg9b5jS2uHOHPscAZngFjUiJpcajITR0dY8YV JjVDE8ycc8b6eECqEeQXI/4zax0yoIofnie2NoSNm7aPSXMAuD+C/No6W/AVSdiUmZJl L+3NEIW5DNcrdTqq6hf6shOBJWbxAfnHGkvnsSDe/BnkEFcv8gzq+a7Rwe/xxBABiw7O 2fS9A1C/XxN4c3Wx6IuBtHfJ9QDZiZk//tbGv5v4T4iOFsbkm9vJolpiD76EfutH5k00 22BA== X-Gm-Message-State: ALoCoQkfd/J8MFT1jcsGDDfb19Qbei8Yjai1vYn7uLFQtXNHy9aWKLcRxmIPdauw2CLrd67+tGnSvOEQ/oQ7VFu1CznUFXXAFB62DpGSReifnxSGGz/dvDIuoJ/OHcOAVw6gcQKl8GCt MIME-Version: 1.0 X-Received: by 10.194.8.229 with SMTP id u5mr693296wja.80.1390562988933; Fri, 24 Jan 2014 03:29:48 -0800 (PST) Received: by 10.227.91.196 with HTTP; Fri, 24 Jan 2014 03:29:48 -0800 (PST) In-Reply-To: References: <52E0F55F.4040802@lsces.co.uk> <52E16AC2.8070400@ajf.me> Date: Fri, 24 Jan 2014 15:29:48 +0400 Message-ID: To: Anatol Belski Cc: Pierre Joye , Andrea Faulds , Derick Rethans , PHP Internals Content-Type: multipart/alternative; boundary=047d7b5d35defe62f804f0b5ac02 Subject: Re: [PHP-DEV] [RFC] 64 bit platform improvements for string length and integer From: dmitry@zend.com (Dmitry Stogov) --047d7b5d35defe62f804f0b5ac02 Content-Type: text/plain; charset=UTF-8 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. Thanks. Dmitry. On Fri, Jan 24, 2014 at 12:36 PM, Anatol Belski wrote: > Hi Dmitry, > > On Fri, January 24, 2014 08:32, Dmitry Stogov wrote: > > Unfortunately, my benchmarks on Linux show that 64-bit PHP builds are > > always a bit slower on real-life applications. It's because 64-bit PHP > uses > > more memory and as result causes more CPU cache misses. > > > i suppose the perf test on windows to be done today. > > That topic was also it my mind while worked on str_size_and_int64 branch. > What I have seen is that till now PHP code doesn't really care about 64 > bit performance. I was reading the "Software Optimization Guide for AMD64 > Processors" http://support.amd.com/TechDocs/25112.PDF and comparing with > their recomendations one can find many places in PHP code needing some > refactoring. Some primitive points to name like use of non contiguous > values in switches, 32 bit vars in loops, no homogeneous 64 bit vars > usage, etc. - could be improved. One of good moves is usage of the const > qualifier lately. Now with the consistent 64 bit support such a > refactoring would have base and sense. > > Regards > > Anatol > --047d7b5d35defe62f804f0b5ac02--