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


Groups > comp.lang.python > #68049

Re: Python performance

From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: Python performance
Date 2014-03-08 13:56 -0500
References <290bb6ed-a17e-45e3-8ff7-e58bb50e66a6@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.7935.1394304975.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 3/8/14 7:53 AM, JCosta wrote:
> I did some work in c# and java and I converted some application to Python; I noticed Python is much slower than the other languages.
>
> Is this normal ?
> Thanks
>

Your question, and the replies so far in this thread, have overlooked 
the difference between language and implementation.  Python as a 
language has no inherent speed.  Your question is really about CPython, 
the reference and most-common implementation of the language.  It 
interprets virtual-machine bytecode, and so will pay a penalty for 
compute-bound code.

But PyPy is another implementation of Python.  It uses a JIT to produce 
native code automatically, and can impressively speed up the execution 
of Python programs.  You should give it a try to see if it will help in 
your situation.

-- 
Ned Batchelder, http://nedbatchelder.com

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


Thread

Python performance JCosta <generalcosta@gmail.com> - 2014-03-08 04:53 -0800
  Re: Python performance Chris Angelico <rosuav@gmail.com> - 2014-03-09 00:24 +1100
  Re: Python performance Tim Chase <python.list@tim.thechases.com> - 2014-03-08 07:40 -0600
  Re: Python performance Marko Rauhamaa <marko@pacujo.net> - 2014-03-08 19:48 +0200
  Re: Python performance JCosta <generalcosta@gmail.com> - 2014-03-08 10:30 -0800
    Re: Python performance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-08 18:49 +0000
  Re: Python performance Ned Batchelder <ned@nedbatchelder.com> - 2014-03-08 13:56 -0500

csiph-web