On Wednesday, July 20, 2011 at 10:27:24 AM, Maciej Fijalkowski
wrote:
> On Wed, Jul 20, 2011 at 9:25 AM, David Fraser
> wrote:
> >
> >
> > On Wednesday, July 20, 2011, at 8:50:20 AM, "Alexander Petrov"
> > wrote:
> >> [snip]
> >> So at this time I didn't come to some kind of decision about Py
On 07/20/2011 08:50 AM, Alexander Petrov wrote:
So at this time I didn't come to some kind of decision about PyPy.
On one hand in most of the cases with straitforward code/algorithms
and "common" syntax constructs there was significant speed
improvement.
But on the other hand, for the cases whe
On Wed, Jul 20, 2011 at 9:25 AM, David Fraser wrote:
>
>
> On Wednesday, July 20, 2011, at 8:50:20 AM, "Alexander Petrov"
> wrote:
>> [snip]
>> So at this time I didn't come to some kind of decision about PyPy.
>>
>> On one hand in most of the cases with straitforward code/algorithms
>> and "com
On Wednesday, July 20, 2011, at 8:50:20 AM, "Alexander Petrov"
wrote:
> [snip]
> So at this time I didn't come to some kind of decision about PyPy.
>
> On one hand in most of the cases with straitforward code/algorithms
> and "common" syntax constructs there was significant speed
> improvement
Thanks to all for the answers.
Small remarks.
I remember, I wrote such code (using itertools.repeat with slices)
after spending near a day measuring performance of some syntactical
constructs usually in several algorithms dealing with numbers... So I
was trying to produce a sort of Python coding s
I'm not too sure what could be better wrong with it, it's rather short:
https://bitbucket.org/pypy/pypy/src/default/pypy/module/itertools/interp_itertools.py#cl-85
Alex
On Fri, Jul 8, 2011 at 2:18 AM, Armin Rigo wrote:
> Hi Alex,
>
> Before attacking the problem with the JIT, we should understa
Armin Rigo, 08.07.2011 11:18:
Before attacking the problem with the JIT, we should understand better
why PyPy is 4-8 times slower than CPython. Normally you'd expect the
factor to be at most 2. I suppose the answer is that our
itertools.repeat() is bad for some reason.
You shouldn't forget th
Hi Alex,
Before attacking the problem with the JIT, we should understand better
why PyPy is 4-8 times slower than CPython. Normally you'd expect the
factor to be at most 2. I suppose the answer is that our
itertools.repeat() is bad for some reason.
A bientôt,
Armin.
__
No, you would need to implement list.__setitem__ in Python, which we could
do, does the JIT see such code?
Alex
On Thu, Jul 7, 2011 at 6:05 PM, wrote:
> On 12:38 am, alex.gay...@gmail.com wrote:
>
>> repeat itself is not slow, it's just that when it's used it iterates over
>> it, in RPython (me
On 12:38 am, alex.gay...@gmail.com wrote:
repeat itself is not slow, it's just that when it's used it iterates
over
it, in RPython (meaning it's not jit'd) which results in a dictionary
lookup
for the next() method at every iteration, which is slowish, list hits a
special case so it doesn' thav
repeat itself is not slow, it's just that when it's used it iterates over
it, in RPython (meaning it's not jit'd) which results in a dictionary lookup
for the next() method at every iteration, which is slowish, list hits a
special case so it doesn' thave that overhead.
Alex
On Thu, Jul 7, 2011 at
Hi
When I change this line:
primes[i*i:N+1:i] = repeat(False, len(primes[i*i:N+1:i]))
into this :
primes[i*i:N+1:i] = [False] * len(primes[i*i:N+1:i])
PyPy is much faster (but is still slower than CPython), so I would guess
that the repeat function is the one to blame.
Cheers
Romain
On Fri,
On Thu, Jul 7, 2011 at 4:03 PM, Alexander Petrov wrote:
> Hi.
>
> I'm new to PyPy and was trying to run some tests to see orders of
> speed improvement.
>
> Short script generating list of prime numbers using rather
> straightforward implementation of Eratosthene's sieve.
> Script: http://paste.p
Hi.
I'm new to PyPy and was trying to run some tests to see orders of
speed improvement.
Short script generating list of prime numbers using rather
straightforward implementation of Eratosthene's sieve.
Script: http://paste.pocoo.org/show/432727/
Typical results: http://paste.pocoo.org/show/4327
14 matches
Mail list logo