[pypy-dev] Re: [pypy-svn] r20092 - pypy/dist/pypy/rpython

Armin Rigo arigo at tunes.org
Mon Nov 21 12:55:56 CET 2005


Hi Christian,

On Mon, Nov 21, 2005 at 02:04:01AM -0800, Christian Tismer wrote:
> CPython does allow float keys and doesn't have portability
> problems. The only concern here is compatability with equally
> values integer keys. But that does not apply to RPython, since
> we there dfon't allow mixing types at all.

Good point.  RPython can probably live with a simple hash function for
floats, and our W_FloatObject's hash can be more complicated (possibly
using the integer as hash when the float has no fractional part, like
now, or falling back to the RPython hash if there is a fractional part).

> 64 bit long would be perfect

That's a possibility.  For PyPy we should be more explicit, though, and
use a "class r_longlong" or "class r_int64".  It should be part of a
general design that would allow integers of various precisions.  The
design decision is to choose if we want classes with explicit sizes
(r_int64) or C-like names (longlong)...


A bientot,

Armin.



More information about the Pypy-dev mailing list