[Python-checkins] r51492 - in python/branches/int_unification: Include/boolobject.h Include/intobject.h Include/longobject.h Modules/_sre.c Objects/abstract.c Objects/boolobject.c Objects/exceptions.c Objects/intobject.c Objects/listobject.c Objects/longobject.c Python/bltinmodule.c Python/marshal.c Python/pythonrun.c

M.-A. Lemburg mal at egenix.com
Wed Aug 23 13:32:43 CEST 2006


martin.v.loewis wrote:
> Author: martin.v.loewis
> Date: Tue Aug 22 23:41:27 2006
> New Revision: 51492
> 
> Modified:
>    python/branches/int_unification/Include/boolobject.h
>    python/branches/int_unification/Include/intobject.h
>    python/branches/int_unification/Include/longobject.h
>    python/branches/int_unification/Modules/_sre.c
>    python/branches/int_unification/Objects/abstract.c
>    python/branches/int_unification/Objects/boolobject.c
>    python/branches/int_unification/Objects/exceptions.c
>    python/branches/int_unification/Objects/intobject.c
>    python/branches/int_unification/Objects/listobject.c
>    python/branches/int_unification/Objects/longobject.c
>    python/branches/int_unification/Python/bltinmodule.c
>    python/branches/int_unification/Python/marshal.c
>    python/branches/int_unification/Python/pythonrun.c
> Log:
> Drop the int type.

Wouldn't it be better to add the long implementation on top
of the int implementation rather than replacing int with
long ?

Integers are by far the most used objects in Python and thus
need to be as fast as possible. OTOH, longs are not used a lot
in everyday Python programming.

Furthermore, ints are fixed sized objects whereas longs
are variable sized objects. As stated above, you rarely
need the extended range that longs have to offer, but you
still have to pay for it in every single int object you have
in the Python process.

>From a performance perspective I think it would be fair
to put the burden on the long-type usage of integers and
keep the int-type usage as optimized as it currently is.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 23 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list