Also documentation to std.array.Appender says that "it is more efficient" to use Appender "when appending many elements". Does it imply that Appender.put has amortized O(1)?
Complexity guaranties of array append operator
Dmitriy via Digitalmars-d-learn Wed, 05 Nov 2014 19:51:54 -0800
Hello, I'm in the middle of learning D. I can't find any
definitive information about what is the complexity of operator
~= when used for adding an element to an array. Is it amortized
O(1) or is it implementation defined? (I hope it at worst O(n)
though I haven't seen any information about that either).
- Complexity guaranties of arra... Dmitriy via Digitalmars-d-learn
- Re: Complexity guarantie... Jonathan M Davis via Digitalmars-d-learn
- Re: Complexity guarantie... Steven Schveighoffer via Digitalmars-d-learn