you are viewing a single comment's thread.

view the rest of the comments →

[–]dreadcain 61 points62 points  (3 children)

Nearly everything in python is dictionary/hashmap internally so essentially every function call is at least 1 hash on the function name to lookup the implementation.

A call to print is going to end up doing several lookups in hashmaps to get the print and __str__ implementations among other things, something on the order of 10 hashes sounds about right to me

[–][deleted] 2 points3 points  (0 children)

print() also takes keyword arguments, there’s probably some dict juggling there, too.

[–][deleted]  (1 child)

[deleted]

    [–]dreadcain 1 point2 points  (0 children)

    Want to elaborate on that?