containers icon indicating copy to clipboard operation
containers copied to clipboard

Data.Sequence time bounds: emphasize (stronger) that they are amortized?

Open jwaldmann opened this issue 3 years ago • 1 comments

All time bounds are amortized (as in the Hinze/Paterson paper) but API docs mention that word only once "An amortized running time is given for each operation". A casual reader might miss that, especially when looking up just one function, and not reading the full document?

jwaldmann avatar Jul 07 '22 12:07 jwaldmann

It wouldn't be bad to give a better explanation. It would also be good to give some worst-case bounds and the contexts in which they hold. In particular, avoiding certain "bulk" operations like fmap, you get worst-case logarithmic bounds for basic operations like cons, uncons, append, and split. For appending and splitting I think they're worst-case logarithmic in total size rather than smaller part size.

treeowl avatar Jul 07 '22 16:07 treeowl