I would suggest then to have @doc time: "O(n)"
and @doc space: "O(n^2)" to clearly refer to time and space complexity of the function. Mário quinta-feira, 18 de Julho de 2019 às 17:36:04 UTC+1, Mário Guimarães escreveu: > > Hi, > > I find this can be useful in selecting the collections and their > manipulating functions to be used in our code. > > The case is that in an immutable language it may not be evident what is > the O(...) of the insert, read, update, delete and sort, in our collections. > > For example, what is the complexity of sorting an immutable enumerable via > `Enum.sort`? I really do not know. > > This could be documented with a table at the start of the documentation > for the collection. > > This effort could be decomposed in as many issues as the number of > collections to document. > > Experienced people may know many of these Big-O details, but for > newcommers to Elixir (and Erlang) it could be very helpful. > > Thanks > Mário > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/7e570c16-9cbc-44af-a42b-18b4f39f2742%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.