Hi Hakan, On Sun, Nov 8, 2015 at 9:39 AM, Hakan Ardo <ha...@debian.org> wrote: > A small adjustment to your approach that would cover those cases is to > compare the values of the constants with the values observed during tracing. > If they are the same it should be safe to perform the read, right?
Ah, that's a good plan too. It needs to have a way to record what we saw during tracing (preferably not in some huge dict), and we decided long ago that the optimizer should not essentially look at the content of boxes (apart to guide some optimizations). For example, CALL_PURE uses a big dict. The problem is that such a dict would be much bigger for all GETFIELD_PURE. I'm still going with checking the gctype of the object. It should work in the same cases (and theoretically more but well). A bientôt, Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev