diff --git a/docs/writing/style.rst b/docs/writing/style.rst index 2d6316e5f..3ccdb3034 100644 --- a/docs/writing/style.rst +++ b/docs/writing/style.rst @@ -327,22 +327,22 @@ A common idiom for creating strings is to use `join `_ page. +Even though both functions look identical, because *lookup_set* is utilizing the fact that sets in python are hashtables, the lookup performance between the two is very different. +Python will have to go through each item in the list to find a matching case, which is time consuming. By analysing the hash of the items in the set can be done very quickly. +For more information see this `StackOverflow `_ page. Note: python dictionaries and sets have the lookup performance. Zen of Python -------------