Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2014-03-10 Thread David Naylor
On Friday, 26 August 2011 06:37:30 Armin Rigo wrote: Hi David, On Thu, Aug 25, 2011 at 9:44 PM, David Naylor naylor.b.da...@gmail.com wrote: Below is the patch, and results, for my proposed hash methods for datetime.datetime (and easily adaptable to include tzinfo and the other datetime

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-25 Thread David Naylor
On Tuesday, 16 August 2011 15:27:30 Armin Rigo wrote: Hi David, On Mon, Aug 15, 2011 at 6:20 PM, David Naylor naylor.b.da...@gmail.com wrote: For me the performance of datetime object's hashing is sufficient but I think the python code could use some performance improvements. Is my

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-25 Thread Armin Rigo
Hi David, On Thu, Aug 25, 2011 at 9:44 PM, David Naylor naylor.b.da...@gmail.com wrote: Below is the patch, and results, for my proposed hash methods for datetime.datetime (and easily adaptable to include tzinfo and the other datetime objects).  I tried to make the hash safe for both 32bit and

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-15 Thread Armin Rigo
Hi David, On Sat, Aug 13, 2011 at 8:14 PM, David Naylor naylor.b.da...@gmail.com wrote: So, it appears pypy is failing to speed up this contrived example... I think that it is expected, because the hash is computed entirely as pure Python code in the case of PyPy (doing integer arithmetic with

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-15 Thread Alex Gaynor
On Mon, Aug 15, 2011 at 2:05 AM, Armin Rigo ar...@tunes.org wrote: Hi David, On Sat, Aug 13, 2011 at 8:14 PM, David Naylor naylor.b.da...@gmail.com wrote: So, it appears pypy is failing to speed up this contrived example... I think that it is expected, because the hash is computed

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-15 Thread Armin Rigo
Hi Alex, On Mon, Aug 15, 2011 at 3:36 PM, Alex Gaynor alex.gay...@gmail.com wrote: I'd like to express that, unless we have a very compelling reason, we should try to keep more stuff in pure python, as opposed to RPython.  Mostly because it speeds up translation ;) (also easier to test, easier

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-15 Thread David Naylor
On Monday, 15 August 2011 09:05:22 Armin Rigo wrote: Hi David, On Sat, Aug 13, 2011 at 8:14 PM, David Naylor naylor.b.da...@gmail.com wrote: So, it appears pypy is failing to speed up this contrived example... I think that it is expected, because the hash is computed entirely as pure

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-15 Thread Antonio Cuni
On 15/08/11 15:36, Alex Gaynor wrote: I'd like to express that, unless we have a very compelling reason, we should try to keep more stuff in pure python, as opposed to RPython. Mostly because it speeds up translation ;) (also easier to test, easier to write, etc.). or, on the other hand, we

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-12 Thread Antonio Cuni
Hello David, On 10/08/11 21:27, David Naylor wrote: Hi, I needed to create a cache of date and time objects and I wondered what was the best way to handle the cache. For comparison I put together the following test: [cut] Pypy displays significant slowdown in the defaultdict function,

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-12 Thread Antonio Cuni
On 12/08/11 14:51, Antonio Cuni wrote: @bench.bench for reference, here is the implementation of the bench decorator: https://bitbucket.org/antocuni/env/src/1b11491fab79/pypath/bench.py ___ pypy-dev mailing list pypy-dev@python.org

Re: [pypy-dev] Python vs pypy: interesting performance difference [dict.setdefault]

2011-08-12 Thread David Naylor
On Friday, 12 August 2011 14:51:36 Antonio Cuni wrote: Hello David, On 10/08/11 21:27, David Naylor wrote: Hi, I needed to create a cache of date and time objects and I wondered what was the best way to handle the cache. For comparison I put together the following test: [cut]