Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-21 Thread Armin Rigo
Hi Boris, Sorry, I can't help you more from just seeing the fragments of code. I would need to look at the whole source. Armin ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev

Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-20 Thread Boris
> Alternatively, there is a way to display where the operations come from, but only during testing. I did this; which was good advice, as it generated several errors that the ordinary compiler doesn't flag. After fixing those up, I get the following (paraphrased): pop__AccessDirect_None:46 setar

Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-18 Thread Carl Friedrich Bolz
On 09/17/2011 11:38 PM, Boris wrote: It's a little long for that, I was hoping people would request what is relevant. You could put the code on some public code hosting (e.g. bitbucket.org) and point to the repo if you don't want to mail it around. Carl Friedrich

Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-18 Thread Armin Rigo
Hi Boris, All machine code instructions produced by the JIT have a place that they code from in your RPython code. In this case I suspect that it's from self.compare(), but again, it's a bit hard to know without having access to the complete source code. Alternatively, there is a way to display

Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-17 Thread Boris
It's a little long for that, I was hoping people would request what is relevant. Here's some pertinent snippets (again, this is all an experiment, so it is not pretty). jitdriver = JitDriver(greens=['pc', 'method'], reds=['self'], virtualizables=['self']

Re: [pypy-dev] Spurious dict lookups in my JIT loops

2011-09-17 Thread Benjamin Peterson
This would probably be easier if you showed us the code. 2011/9/17 Boris : > Hi, > > I've been trying out writing my own interpreter using the PyPy framework > recently, as a bit of fun. I've been trying to get the JIT to optimize a > trivial loop down to the minimal amount of operations. With jud

[pypy-dev] Spurious dict lookups in my JIT loops

2011-09-17 Thread Boris
Hi, I've been trying out writing my own interpreter using the PyPy framework recently, as a bit of fun. I've been trying to get the JIT to optimize a trivial loop down to the minimal amount of operations. With judicious use of `_immutable_fields_` and `_virtualizable2_`, I've got pretty close. Bu