|
|
|
|
|
by pdonis
4508 days ago
|
|
You should be creating a dict vs. a namedtuple instance once, then accessing it many, many times. What you're doing is creating a lot of dict vs. namedtuple instances, then accessing each one only once. That's mostly testing the instance creation time, not the field access time. |
|
The creation occurs in the --setup portion. The field accesses occur in the actual looping portion of the timeit code.