News for hackers. Stuff that matters.
Re:How fast can we make interpreted Python? by JoshTriplett on Tuesday June 25, 2013 @11:42PM (#5944059)
> 3) Pick your value encoding carefully. You almost always want fast immediate integers. On 64-bit platforms it is quite common these days to repurpose some of the NaN range in IEEE doubles for type tags to enable storing doubles in immediate values.

That technique applies more to JavaScript, which uses doubles as the standard number type, than in Python, which has both integers and floats. Still a good idea to make sure that both native integers and native floats end up as unboxed native types in registers, though.

Re:How fast can we make interpreted Python? by cwzwarich on Wednesday June 26, 2013 @12:14AM (#5944151)
Thanks for the correction, I wasn't aware that Python uses floats. I would guess that most new languages starting today would use doubles instead of floats.
Re:How fast can we make interpreted Python? by laurencerowe on Wednesday June 26, 2013 @01:48AM (#5944405)
'''...almost all platforms map Python floats to IEEE-754 “double precision”.''' http://docs.python.org/2/tutorial/floatingpoint.html
Re:How fast can we make interpreted Python? by MostAwesomeDude on Wednesday June 26, 2013 @09:43AM (#5945922)
Python as a language requires the float type to have at least double precision. This is sadly not documented explicitly, but the big four Python implementations all respect this.
Re:How fast can we make interpreted Python? by JoshTriplett on Wednesday June 26, 2013 @10:12AM (#5946130)
I didn't mean that Python uses "float" instead of "double"; I meant that Python has both integer and floating-point types, not just floating-point types as in JavaScript.