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


Groups > comp.lang.python > #59446

Re: pypy and ctypes

From Neil Cerutti <neilc@norwich.edu>
Newsgroups comp.lang.python
Subject Re: pypy and ctypes
Date 2013-11-14 15:13 +0000
Organization Norwich University
Message-ID <bek7kuFp9neU1@mid.individual.net> (permalink)
References <omidlaxggl.ln2@phoenix.fire>

Show all headers | View raw


On 2013-11-14, Peter Chant <pete@petezilla.co.uk> wrote:
> Or is it that - if I keep the code as simple as possible, PyPy
> is about as fast as you can get?

PyPy profiles your code as it runs and creates, using a
just-in-time compiler, highly optimized versions of frequently
run sections. You don't have to declare types or even think about
it; The scheme will work best with code that runs for a
significant amount of time.

cython allows you to declare types, and attempts to create more
efficient code *at compile time* using those type declaration.

Which approach will be better depends on how the code runs and
how clever you are at using cython.

PyPy isn't designed to speed up programs that run for a few
hundred milliseconds and then complete, though it might sometimes
work for that.

-- 
Neil Cerutti

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


Thread

pypy and ctypes Peter Chant <pete@petezilla.co.uk> - 2013-11-14 00:39 +0000
  Re: pypy and ctypes Neil Cerutti <neilc@norwich.edu> - 2013-11-14 15:13 +0000
    Re: pypy and ctypes Peter Chant <pete@petezilla.co.uk> - 2013-11-14 23:05 +0000

csiph-web