Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59491
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Peter Chant <pete@petezilla.co.uk> |
| Newsgroups | comp.lang.python |
| Subject | Re: pypy and ctypes |
| Date | Thu, 14 Nov 2013 23:05:16 +0000 |
| Lines | 32 |
| Message-ID | <ci1glaxojc.ln2@phoenix.fire> (permalink) |
| References | <omidlaxggl.ln2@phoenix.fire> <bek7kuFp9neU1@mid.individual.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net iLeADWTwhH1AwRq/q0k58Qlou+jvBpQjdtgJ0m9FQp1bExh4Y= |
| X-Orig-Path | phoenix.fire!not-for-mail |
| Cancel-Lock | sha1:VHvCRvdkMqJpBlK4sU8/Se4LNpU= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131102 Thunderbird/17.0.10 |
| In-Reply-To | <bek7kuFp9neU1@mid.individual.net> |
| Xref | csiph.com comp.lang.python:59491 |
Show key headers only | View raw
On 11/14/2013 03:13 PM, Neil Cerutti wrote: > 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. > That is the situation I'm in. If it only ran for a second or two there'd be no point in worrying about speed. PyPy gave a massive speed up. I was wonding if I could do a little more. > 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. If it is marginal then I don't think the effort would be worth while. I do wonder whether writing some specific functions in C using cffi would benefit. It is something I have no experience of. > > 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. >
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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