Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60673 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54772 invoked from network); 24 May 2012 15:49:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2012 15:49:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.220.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:41678] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/4B-31936-9885EBF4 for ; Thu, 24 May 2012 11:49:30 -0400 Received: by vcbfk1 with SMTP id fk1so1821266vcb.29 for ; Thu, 24 May 2012 08:49:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=vY6hzjHxGaD1+okJWv79wDXmTJyoa/hrw9BQrMxlMDk=; b=VMNnB8IvCpGDwvhfKJOTAeu0d+h2Nh4KuT/QrkSy1GSiL5yd499Jn7OjX0/AxOi5Fu j84LoudsijYdbFmI34f/WwzcDT1tUUgNhNEU+YA+cMSIMDOft+pqmpHTSVslKcM1LyJO aTptK7YOn9d+IFleMTMC+zYHEBw2nNJBzzgMaI4wobhOxGmBrh6WUXZz87MEyR3D/lzL iBYsmNHUAa80lRVFtlgBz6j8LTIPn4/BwSXggeIrpvTuJIng+GOz8Xm7BwrlftbRP0wC wWCEN4Ioz3xcQ05V/KOifjVRE7JaD5WvETm12UVlkPLEew0ihtSTVQ5bSq9Db9LrOpT6 1hYg== Received: by 10.52.88.176 with SMTP id bh16mr12361041vdb.132.1337874567041; Thu, 24 May 2012 08:49:27 -0700 (PDT) Received: from [192.168.200.5] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id j16sm19006505vdt.9.2012.05.24.08.49.25 (version=SSLv3 cipher=OTHER); Thu, 24 May 2012 08:49:26 -0700 (PDT) Message-ID: <4FBE5884.3010009@lerdorf.com> Date: Thu, 24 May 2012 08:49:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tom Boutell CC: PHP Internals References: <55e590f078f22ca2bbe10d5187cd3d84.squirrel@www.l-i-e.com> In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmDzy1ME9uFAF3webTK26jAtQ2jSi8pduMdZF/sWxQJzjrQdAawGRQj9E7WOVeJwXqhSVpk Subject: Re: [PHP-DEV] php interpreter From: rasmus@lerdorf.com (Rasmus Lerdorf) On 05/24/2012 08:23 AM, Tom Boutell wrote: > I've seen this statement before about the impact of caching the actual > compilation (or mere tokenization?) to bytecode being very small > compared to the impact of avoiding disk access. I am curious if there > are any measurements breaking this down. Read-only access to code in > files already buffered by the OS (not files read for the first time) > ought to be very fast. I don't think anyone has any hard numbers on what percentage is gained from each of the optimizations that APC brings. There are actually 3 separate areas, not 2. The obvious skip-compile and skip-disk-read, but also the fact that non-conditional functions and classes are cached and the compiled op arrays modified to NOP out the DECLARE_FUNCTION and DECLARE_CLASS opcodes. The percentage gains are going to different depending on the characteristics of your code. If you have thousands of functions and classes but your code is relatively compact, then the function/class caching might be more significant. -Rasmus