Hi Laurence, On Fri, Nov 8, 2013 at 5:28 PM, Laurence Tratt <lau...@tratt.net> wrote: > my experience, Python programs that nominally use floats actually end up > slinging lots of integers around since very few people can be bothered to > write "x = 1.0" instead of "x = 1". I expect the other types are similarly > intermingled in many programs.
Ok, but then it seems that the first problem we hit down this road, before arriving at the __contains__ performance, is actually mixing ints and floats in the same list. We need to do something to store such lists efficiently. I'm suggesting using a list of floats with a custom encoding of N-bit integers into NaN values (for N==32 or maybe a higher number that still fits). This requires a bit of tweaking here and there (maybe all the way to the JIT) but shouldn't be too hard. A bientôt, Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev