Re: [pypy-dev] Jit hints from python

2012-05-25 Thread Carl Friedrich Bolz
On 05/25/2012 11:03 AM, Armin Rigo wrote: Hi Timothy, On Thu, May 24, 2012 at 8:07 PM, Timothy Baldridge wrote: The only problem is that module and class only accept strings as attribute keys. Just a quick note: that's true for classes but not for modules. Yes, but that doesn't help anyway

Re: [pypy-dev] Jit hints from python

2012-05-25 Thread Armin Rigo
Hi Timothy, On Thu, May 24, 2012 at 8:07 PM, Timothy Baldridge wrote: > The only problem is that module and class only > accept strings as attribute keys. Just a quick note: that's true for classes but not for modules. Armin ___ pypy-dev mailing list

Re: [pypy-dev] Jit hints from python

2012-05-24 Thread Timothy Baldridge
> Note that already nowadays you can hack (maybe we should just make > such hacks more explicit): if you use not a general-purpose dictionary > but instead a namespace like a module or a class, then reads are > constant-folded with an out-of-line guard.  This means you could > rewrite your code for

Re: [pypy-dev] Jit hints from python

2012-05-24 Thread Armin Rigo
Hi Timothy, On Wed, May 23, 2012 at 2:44 PM, Timothy Baldridge wrote: > So my question is, how easy/hard would it be to somehow get a > @purefunction decorator in Python instead of just RPython? For that > matter, having __immutable_fields__ would also be nice, but that may > be asking for too mu

[pypy-dev] Jit hints from python

2012-05-23 Thread Timothy Baldridge
While looking at ways to optimize the Clojure-Py code (http://github.com/halgari/clojure-py) for pypy, I'm noticing that much of Clojure-Py could benefit greatly from giving purefunction hints to the JIT. For example, let's look at the polymorphic Clojure functions known as "protocols": def Proto