Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
changes to get benchmarks running under PY3
Browse files Browse the repository at this point in the history
  • Loading branch information
alimanfoo committed Dec 15, 2015
1 parent 5c228d7 commit a227057
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,6 +12,7 @@ bcolz.egg-info/
*.h5
*.bcolz
myarray
large_carray-bench

# airspeed velocity
bench_asv/env
Expand Down
9 changes: 9 additions & 0 deletions bench/column-iter.py
@@ -1,7 +1,16 @@
from __future__ import print_function
import sys
import contextlib, time
import bcolz, numpy


PY2 = sys.version_info[0] == 2
if not PY2:
xrange = range
def range(*args):
return list(xrange(*args))


@contextlib.contextmanager
def ctime(label=""):
"Counts the time spent in some context"
Expand Down
10 changes: 9 additions & 1 deletion bench/pandas-fromdataframe-strings.py
@@ -1,11 +1,19 @@
# Benchmark for evaluate best ways to convert from a pandas dataframe
# (version with a mix of columns of ints and strings)

import sys
import bcolz
import pandas as pd
import numpy as np
from time import time


PY2 = sys.version_info[0] == 2
if not PY2:
xrange = range
def range(*args):
return list(xrange(*args))


NR = int(1e6)
NC = 100

Expand Down
9 changes: 9 additions & 0 deletions bench/pytables-fromhdf5.py
@@ -1,10 +1,19 @@
# Benchmark for evaluate best ways to read from a PyTables Table

import sys
import bcolz
import tables as tb
import numpy as np
from time import time


PY2 = sys.version_info[0] == 2
if not PY2:
xrange = range
def range(*args):
return list(xrange(*args))


filepath = 'fromhdf5.h5'
nodepath = '/ctable'
NR = int(1e6)
Expand Down

0 comments on commit a227057

Please sign in to comment.