Bug 11077 – iota() should be statically specialized for increment 1

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-20T12:33:24Z
Last change time
2024-12-01T16:18:48Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Moved to GitHub: phobos#10002 →

Comments

Comment #0 by andrei — 2013-09-20T12:33:24Z
iota() for integrals stores the step as a member variable. This makes the frequent case step=1 slower than it should. Calls using iota(max) or iota(min, max) should return a structure not storing step, and using ++ to get to the next item.
Comment #1 by iamthewilsonator — 2019-11-03T05:47:02Z
This is a phobos bug.
Comment #2 by robert.schadek — 2024-12-01T16:18:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10002 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB