Issue 11077 - iota() should be statically specialized for increment 1
Summary: iota() should be statically specialized for increment 1
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-20 12:33 UTC by Andrei Alexandrescu
Modified: 2024-12-01 16:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrei Alexandrescu 2013-09-20 12:33:24 UTC
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 Nicholas Wilson 2019-11-03 05:47:02 UTC
This is a phobos bug.
Comment 2 dlangBugzillaToGithub 2024-12-01 16:18:48 UTC
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