Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Pyhon 2.x or 3.x, which is faster? Date: Tue, 8 Mar 2016 12:23:50 +1100 Lines: 23 Message-ID: References: <87d1r6iltx.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 6CITUX4gbySaqm5TXa4jbA0qQd5/hLBvrEhF7ZQikKdQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; 'subject:which': 0.09; 'python': 0.10; 'def': 0.13; '2.7:': 0.16; '2.7?': 0.16; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'version?': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '3.x': 0.22; 'pass': 0.22; 'appears': 0.23; 'header:In-Reply- To:1': 0.24; 'compare': 0.27; 'message-id:@mail.gmail.com': 0.27; 'code:': 0.29; 'seconds': 0.31; 'another': 0.32; 'tue,': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'there': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'doing': 0.38; 'received:209': 0.38; 'why': 0.39; 'does': 0.39; 'care': 0.60; 'your': 0.60; 'yes': 0.62; 'course': 0.62; 'more': 0.63; 'here:': 0.63; 'mar': 0.65; '3.4': 0.84; '8.4': 0.84; 'chrisa': 0.84; 'cripple': 0.84; 'to:none': 0.91 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:cc; bh=wEPJ08qdUQTY55cA+GAIsHmJevifDuJunwBZ5yw9f9s=; b=CPFi9MgGEq+ZBLhI0qafjzQwBSkvD71g5SBpSLz9qgKxWzLCfPabI6komoDffEHUGT AMbH+gjQML54arzO6s4PxoxMo31XPU4dqoOKpK8JKKK4j4aslCyiftdoMdDxUxFHGri+ E6HdPX6OfahTtYVf6IRJDwQoKWTxR5SpklQkk+IyL1mzQ6QrIcjmtp3u2hi2j9JFWpTC r/m4IAooEl1p6sbtGXXfTZF4rCB8rBwfs0plIKRfByFVPfTr36NFBpk4dUGeECm4p58C bbXY8AQC5LBoz8QVl5i48N2usceERI0Nq+rXDCj4/EPweqD/zpO+Cfr+sv4rpCf0gb7r fuJA== 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:cc; bh=wEPJ08qdUQTY55cA+GAIsHmJevifDuJunwBZ5yw9f9s=; b=Scla334JOfU/xWJoKAbxK/IMwzkN3EWEWAxDIOojHfzPDvXDwV/DJFtYv+41M0R2AG OFpjLMarGCIQ7DaVY129vJuOCNjQywsC4ZLJ3UgFk/y1nR1sIVx9FZhdje9bLArQFhhV 1tu4Dzp5faJm+toQat09v6y+889BbGmTY0S7T4J/gQbLQsCLIKvmgjGzODFDOzIT3Fsd 4M8IhjlbEizfsUPqvVAba1I84wyj4yy4jPt8G+6MS0UE1CSpJbpjNEwbMUn2FDmvaY77 6ygYT9VZ5CneDg+fjxVSwS4u3MpZSzmpzexLzCe9C7Bn22qTGACICtDZ7FXcTeXiENZy HW/w== X-Gm-Message-State: AD7BkJIF6h7rcdvecZzSF6AOhllLRFe+hNfQkG/n1/z1+XyVO6F8+47pGDljls08BUPZhoZxpnnYO8GTmDx19A== X-Received: by 10.107.47.163 with SMTP id v35mr22199274iov.19.1457400230242; Mon, 07 Mar 2016 17:23:50 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104295 On Tue, Mar 8, 2016 at 12:00 PM, BartC wrote: > Yes of course it does. As does 'being slow'. Take another microbenchmark: > > def whiletest(): > | i=0 > | while i<=100000000: > | | i+=1 > > whiletest() > > Python 2.7: 8.4 seconds > Python 3.1: 12.5 seconds > Python 3.4: 18.0 seconds > > Even if you don't care about speed, you must admit that there appears to be > something peculiar going on here: why would 3.4 take more than twice as long > as 2.7? What do they keep doing to 3.x to cripple it on each new version? How do your benchmarks compare on this code: pass ChrisA