Hi Khurshid,

On Fri, Apr 19, 2013 at 1:22 PM, Khurshid Normuradov
<[email protected]> wrote:
> Why more linear algorithms implemented as O(N^2)?
> example: staticMap, or staticIndex,  Erase, EraseAll, and etc..
> see hello.d file.

Well, the algorithms are simply implemented in the most
straightforward way, which is head/tail resp. car/cdr style. Many
people (myself included) tend to switch their brains to functional
programming mode when doing template metaprogramming, and slicing
isn't included in that scheme.

Your approach to reducing the number of "total template arguments"
from O(n²) to O(n log(n)) is interesting, and indeed seems to lead to
speedups for operations on large tuples. Could you maybe put together
some performance numbers and post a pull request for further review?

David
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to