On March 22, 2015 5:56:22 PM GMT+01:00, Robert Grosse <n210241048...@gmail.com> wrote: >Since lists are specialized for storing primative ints, would it be >possible to do something similar with user defined types? Assuming that >most instances of the same type will either store or not store an int >in >the same attribute, you could optimistically specialize it initially >and >fallback to the normal code if this invariant is broken.
Hi Robert, Note that the whole thread *is* about user defined types. The specialization you describe is possible, but entirely non-trivial, with various trade offs involved. This paper describes an approach to solve it: http://www.chrisseaton.com/rubytruffle/pppj14-om/pppj14-om.pdf Cheers, Carl Friedrich _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev