A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-June/036381.html below:

[Python-Dev] On the possibility of "optimizing" range() calls in for-loops

[Python-Dev] On the possibility of "optimizing" range() calls in for-loops [Python-Dev] On the possibility of "optimizing" range() calls in for-loopsRaymond Hettinger python@rcn.com
Sun, 15 Jun 2003 23:59:33 -0400
[Chad Netzer]
> The main issue, as I see it, is substituting some form of lazy range
> iterator, for the range() function, "behind the curtains" as it were.
> People could gain the benefits of xrange() (less memory consumption,
> probably faster looping), without having to promote the continued use
> of xrange().

The SF patch manager has a workable implementation of your idea:

    www.python.org/sf/738094  for i in range(N) optimization 


The jury is still out on whether it is an elegant, brilliant patch or
a horrendous hack.


Raymond Hettinger




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4