On Sep 2, 12:55 pm, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Mark Dickinson <[EMAIL PROTECTED]> wrote:
> > Well, for one thing, you're creating half a million xrange objects in
> > the course of the search.  All the C code has
> > to do is increment a few integers.
>
> I don't think the creation of xrange objects is a meaningful part of
> Python's execution time here.  Consider:
> [...]

Agreed---I just came to the same conclusion after doing some tests.
So maybe it's the billion or so integer objects being created that
dominate the running time?  (Not sure how many integer objects
actually are created here: doesn't Python cache *some* small
integers?)

Mark


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to