10.05.2013, 19:46
Function time complexity is not associated with the actual time it may take for it to execute as this may greatly vary from system to system. Instead it represents the number of operations performed.
The complexity of map::find is O(log n) - that is very efficient and comes from how maps operate internally using binary search.
Anyways this is a very elegant solution in terms of code readability and file organizing, but lets not get ourselves too deep into the premature optimization, shall we :P
The complexity of map::find is O(log n) - that is very efficient and comes from how maps operate internally using binary search.
Anyways this is a very elegant solution in terms of code readability and file organizing, but lets not get ourselves too deep into the premature optimization, shall we :P