ImmutableList <T> Performance

Is performance data documented somewhere ImmutableList<T>? I'm interested in asymptotic complexity (big-O). The msdn link does not show much.

I knew that Add, and this[]both are O (log n) of this article , but I also want to know about Removeand Insert.


I would also like to see how complex all types are in the newly introduced namespace System.Collections.Immutable.

+4
source share
1 answer

, , , RemoveAt (Remove ), Insert , Add. . , , - .. - ImmutableList , , , . AddRange - , , , Node.Add, , . .

ImmutableArray , . , /, . , , . , AddRange - . Add Insert, . , - o/O (n), read - o/O (1).

, ImmutableList , ImmutableArray .

+2

Source: https://habr.com/ru/post/1548629/


All Articles