Commit 52b25293 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/bench: Time namedtuple field access.

That's higher than instance field access - behold the power of hashing.
parent c3602e15
import bench
from _collections import namedtuple
T = namedtuple("Tup", "num bar")
def test(num):
t = T(20000000, 0)
i = 0
while i < t.num:
i += 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment