In 18 timeit nested_contains where 1000000 loops best of 909 ns per lo

1
2
3
4
5
6
7
8
In [18]: %timeit nested_contains(3, where)
1000000 loops, best of 3: 909 ns per loop
In [19]: %timeit nested_contains(4, where)
100000 loops, best of 3: 9.62 µs per loop
In [20]: %timeit nested_contains(9, where)
100000 loops, best of 3: 11.8 µs per loop