Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104134

Re: Pyhon 2.x or 3.x, which is faster?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: Pyhon 2.x or 3.x, which is faster?
Date Sun, 6 Mar 2016 07:17:33 -0500
Lines 15
Message-ID <mailman.240.1457266807.20602.python-list@python.org> (permalink)
References <56DC15B4.2080005@vanderhoff.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de 19T/mEb+8g5373xb3YSQ9wVRag+PGNlcujmZ3nvlgNSA==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'compiler': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:which': 0.09; 'python': 0.10; 'jan': 0.11; '2.7': 0.13; 'file,': 0.15; 'operation,': 0.16; 'python3.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'wrote:': 0.16; 'string': 0.17; 'version.': 0.18; 'os,': 0.22; 'am,': 0.23; 'slightly': 0.23; 'header:In-Reply- To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'van': 0.26; 'lot.': 0.29; 'relative': 0.30; 'operations': 0.31; 'impression': 0.33; 'this?': 0.34; 'sometimes': 0.35; 'there': 0.36; 'depends': 0.36; 'faster': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'hi,': 0.38; 'test': 0.39; 'to:addr:python.org': 0.40; 'received:96': 0.63; 'received:fios.verizon.net': 0.91
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host pool-96-227-207-81.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To <56DC15B4.2080005@vanderhoff.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:104134

Show key headers only | View raw


On 3/6/2016 6:34 AM, Tony van der Hoff wrote:
> Hi, I've been experimenting with a short test program under python 2.7
> and python 3.4.2. It's a simple read from file, and locate a word therein.
>
> I get the (subjective) impression that python2  is slightly faster than
> python3. Is that correct? Is there any documentation to support this?

The relative speed depends on the particular operation, the compiler and 
OS, and the particular 3.x.y version.  Since 3.3.0, string (unicode) 
operations have been sped up, sometimes by a lot.  If you are looking 
for string speed, get 3.4.4 or 3.5.1.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Pyhon 2.x or 3.x, which is faster? Terry Reedy <tjreedy@udel.edu> - 2016-03-06 07:17 -0500

csiph-web