2 ms·
> ...the article is from January 2007; I'd wager that Python has > evolved and had a wealth of optimisations since then... The observations I made regarding
by Estragon 15y ago
> ...the article is from January 2007; I'd wager that Python has
> evolved and had a wealth of optimisations since then...
The observations I made regarding list-comprehensions vs map have been true since list comprehensions were first introduced.
> Did you try itertools.imap instead? Vanilla map gives us a list;
> imap gives us a generator.
Don't see why that would make any difference (except to confuse the benchmark, as the python3 examples in this thread show.)