[pypy-dev] Re: Ints vs Longs
florian.proff.schulze at gmx.net
Mon Oct 13 12:51:26 CEST 2003
On Mon, 13 Oct 2003 10:58:14 +0100, Michael Hudson <mwh at python.net> wrote:
> Florian Schulze <florian.proff.schulze at gmx.net> writes:
>> I just wondered what happens when ints overflow.
> In PyPy, um, I'm not sure :-) We don't have a long type in the
> StdObjSpace yet, so I guess you'll get an overflow error.
>> This question also applies to Psyco.
> Psyco correctly detects overflow and returns a long.
> For mulitplication, at least, this is easier in machine code than C...
That's because there is an overflow flag ;)
>> Is a long returned? How much of a speed penalty does occure due to
> I don't know. It's probably quite substantial.
Hmm, now that you mentioned that Psyco uses machinecode, I think the
penalty is not *that* high. It depends on how well the processor handles
the branching, I guess.
More information about the Pypy-dev