This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jcea
Recipients jcea
Date 2014-06-13.04:02:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402632147.52.0.812545873846.issue21744@psf.upfronthosting.co.za>
In-reply-to
Content
If L is a big sequence and I do "itertool.islice(L, 1000000, None)", islice will go over a million elements before returning the first that I actually cared.

Since L is a sequence, islice could go directly to the element 1000000.

My program performance improved hugely replacing a "for i in L[p:]" for "for i in (L[p] for p in range(p, len(L)))".

Using itertools and doing "for i in itertools.islice(L, p, None)" is massively inefficient.
History
Date User Action Args
2014-06-13 04:02:27jceasetrecipients: + jcea
2014-06-13 04:02:27jceasetmessageid: <1402632147.52.0.812545873846.issue21744@psf.upfronthosting.co.za>
2014-06-13 04:02:27jcealinkissue21744 messages
2014-06-13 04:02:26jceacreate