Vbench performance benchmarks for pandas

index_object

index_int64_intersection

Benchmark setup

from pandas_vb_common import *

N = 1000000
options = np.arange(N)

left = Index(options.take(np.random.permutation(N)[:N // 2]))
right = Index(options.take(np.random.permutation(N)[:N // 2]))

Benchmark statement

left.intersection(right)

Performance graph

_images/index_int64_intersection.png

index_int64_union

Benchmark setup

from pandas_vb_common import *

N = 1000000
options = np.arange(N)

left = Index(options.take(np.random.permutation(N)[:N // 2]))
right = Index(options.take(np.random.permutation(N)[:N // 2]))

Benchmark statement

left.union(right)

Performance graph

_images/index_int64_union.png

index_datetime_union

Benchmark setup

from pandas_vb_common import *

rng = DateRange('1/1/2000', periods=10000, offset=datetools.Minute())
rng = rng.view(Index)
rng2 = rng[:-1]

Benchmark statement

rng.union(rng2)

Performance graph

_images/index_datetime_union.png

index_datetime_intersection

Benchmark setup

from pandas_vb_common import *

rng = DateRange('1/1/2000', periods=10000, offset=datetools.Minute())
rng = rng.view(Index)
rng2 = rng[:-1]

Benchmark statement

rng.intersection(rng2)

Performance graph

_images/index_datetime_intersection.png