[Python-Dev] iterzip() (original) (raw)
Guido van Rossum guido@python.org
Mon, 29 Apr 2002 08:30:55 -0400
- Previous message: [Python-Dev] iterzip()
- Next message: [Python-Dev] iterzip()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Did you time any of these?
I just timed it and am shocked. iterzip() has exactly the same code as zip() except for the final append result to list. So, I expected only a microscopic speed-up. I don't see where the huge performance improvement came from.
Probably the list-append still has a slight quadratic component -- you're doing a million elements here.
But I asked something else. How much does the speed difference affect the apps you have? In my experience it's usually used for small lists where the quadratic effect doesn't occur and the timing doesn't matter compared to the rest of the program.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] iterzip()
- Next message: [Python-Dev] iterzip()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]