Andrei Alexandrescu <[email protected]> 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
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to