the benchmarking interlude now that we know about coding functions and iteration toolswe're going to take short side trip to put both of them to work this closes out the function part of this book with larger case study that times the relative performance of the iteration tools we've met so far along the waythis case study surveys python' code timing toolsdiscusses benchmarking techniques in generaland allows us to explore code that' bit more realistic and useful than most of what we've seen up to this point we'll also measure the speed of current python implementations-- data point that may or may not be significantdepending on the type of code you write finallybecause this is the last in this part of the bookwe'll close with the usual sets of "gotchasand exercises to help you start coding the ideas you've read about firstthoughlet' have some fun with tangible python application timing iteration alternatives we've met quite few iteration alternatives in this book like much in programmingthey represent tradeoffs--in terms of both subjective factors like expressivenessand more objective criteria such as performance part of your job as programmer and engineer is selecting tools based on factors like these in terms of performancei've mentioned few times that list comprehensions sometimes have speed advantage over for loop statementsand that map calls can be faster or slower than both depending on call patterns the generator functions and expressions of the preceding tend to be slightly slower than list comprehensionsthough they minimize memory space requirements and don' delay result generation all that is generally true todaybut relative performance can vary over time because python' internals are constantly being changed and optimizedand code structure can influence speed arbitrarily if you want to verify their performance for yourselfyou need to time these alternatives on your own computer and your own version of python