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?

From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: Pyhon 2.x or 3.x, which is faster?
Date 2016-03-06 07:17 -0500
Message-ID <mailman.240.1457266807.20602.python-list@python.org> (permalink)
References <56DC15B4.2080005@vanderhoff.org>

Show all headers | 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