From owner-freebsd-performance@FreeBSD.ORG Fri Feb 8 22:31:47 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1D116A476; Fri, 8 Feb 2008 22:31:47 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF9113C4D9; Fri, 8 Feb 2008 22:31:47 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out4.apple.com (Postfix) with ESMTP id 1028F218ED76; Fri, 8 Feb 2008 14:31:47 -0800 (PST) Received: from relay12.apple.com (unknown [127.0.0.1]) by relay12.apple.com (Symantec Mail Security) with ESMTP id ECA69464002; Fri, 8 Feb 2008 14:31:46 -0800 (PST) X-AuditID: 11807135-a7830bb00000423e-f7-47acd8522335 Received: from cswiger1.apple.com (cswiger1.apple.com [17.214.13.96]) by relay12.apple.com (Apple SCV relay) with ESMTP id D288C420002; Fri, 8 Feb 2008 14:31:46 -0800 (PST) Message-Id: <967A7CF9-D9FE-454F-92E1-68D21CBDFA5E@mac.com> From: Chuck Swiger To: Ivan Voras In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Fri, 8 Feb 2008 14:31:45 -0800 References: <4796C717.9000507@cederstrand.dk> <20080123193400.N63024@fledge.watson.org> <4797A245.7080202@cederstrand.dk> <20080123202433.E63024@fledge.watson.org> <4797A802.8060509@FreeBSD.org> <47A0BFE7.4070708@cederstrand.dk> <20080130190000.GA18333@lor.one-eyed-alien.net> <47AC15A5.5020009@cederstrand.dk> <20080208151756.GA35423@lor.one-eyed-alien.net> <9D27D745-2465-4FB2-B7E0-3C5DD411E9B9@mac.com> X-Mailer: Apple Mail (2.915) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-performance@freebsd.org Subject: Re: Performance Tracker project update X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 22:31:47 -0000 On Feb 8, 2008, at 12:43 PM, Ivan Voras wrote: >> Historically, the Python optimizer wasn't capable of doing much, >> true, but the more recent versions of the optimizer can actually do >> some peephole optimizations like algorithmic simplification and >> constant folding: >> http://docs.python.org/whatsnew/other-lang.html#SECTION0001320000000000000000 > > A quick test with the built-in pystone mini-benchmark (taken out of > the standard library so the optimization can be varied) yields [*]: > > python without -O : 5802.36 > python with -O : 5781.39 That's ~ 0.4% difference, or low enough to be lost in the noise, agreed. I suspect that if the Python optimizer becomes smart enough to do dead- code elimination and code motion of invariants outside of loops that one would see a more significant difference. At the present, it's only smart enough to optimize pretty dumb cases that most humans would already deal with... -- -Chuck