Complexity nomenclature

Jakob Ovrum via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 4 01:57:48 PST 2015


On Friday, 4 December 2015 at 09:51:05 UTC, tn wrote:
> "I just want to insert an element. I don't care how long it 
> takes. Why do I need to specify that it should be linear?"
>
> In my opinion, there should be "constantInsert", 
> "linearInsert", etc. for those who care about the complexity, 
> and "insert" should be always available.

In the current std.container, linearInsert aliases to the 
sublinear insert function when it's provided. If you don't care 
about running time, just use linearInsert.



More information about the Digitalmars-d mailing list