summaryrefslogtreecommitdiff
path: root/tests/internal_bench/var-6.6-instance-builtin_ordered.py
blob: 02d75252301922b8191cfe724f3472af16e27248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import bench


def test(num):
    i = 0
    o = set()  # object with largest rom-frozen ordered locals_dict
    n = "__contains__"  # last element in that dict for longest lookup
    while i < num:
        i += hasattr(o, n)  # True, converts to 1


bench.run(test)