[phobos] phobos commit, revision 1566
Shin Fujishiro
rsinfu at gmail.com
Sat May 29 07:23:45 PDT 2010
Andrei Alexandrescu <andrei at erdani.com> wrote:
> Actually I was looking in the wrong place. The problem is this constructor:
>
> 1214 this(R input, size_t maxAvailable)
> 1215 {
> 1216 static if (backByBack)
> 1217 {
> 1218 while (input.length > maxAvailable)
> 1219 input.popBack;
> 1220 }
> 1221 _input = input;
> 1222 _maxAvailable = maxAvailable;
> 1223 }
>
> This constructor is O(n), which is unacceptable. The whole backByBack
> logic must be erased.
>
Agreed. Actually I tested the code with a 10,000,000-elements range
and experienced 'it'. backByBack was just for a backward compatibility.
Now I erased it from the svn.
Shin
More information about the phobos
mailing list