GitXplorerGitXplorer
e

python-fastsort-benchmark

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
90001776ccba0423a748253706d8f91ceeadbb3d

Merge branch 'master' of https://github.com/embg/python-fastsort-benchmark

eembg committed 8 years ago
Unverified
9d081f575abc51eeb93b422aacfe6c467de7ff2c

structured benchmark

eembg committed 8 years ago
Unverified
be69abd986cf88213a07b1a326fdea81ffc622f4

structured benchmark

eembg committed 8 years ago
Unverified
247d0ef003f8a158a07b638323d95406794581cf

Add files via upload

eembg committed 8 years ago
Unverified
707ed973184ccc10dc724954cec509541301691b

Create README.md

eembg committed 8 years ago
Unverified
7619392ed6578832e359f6fb5ffddcca4dfd5b55

benchmark scripts

eembg committed 8 years ago

README

The README file for this repository.

python-fastsort-benchmark

A simple benchmark demonstrating the speed-up from exploiting type-homogeneity in list.sort(). To build:

sh build.sh

To run the benchmark:

python-ref/python bench.py ref.pickle
python-dev/python bench.py dev.pickle

To process the pickles (here, we compute mean and standard deviation for each type):

import pickle
ref = pickle.load(open('ref.pickle','rb'))
dev = pickle.load(open('dev.pickle','rb'))

import numpy as np
for interpreter in [ref,dev]:
    for bench_set in interpreter:
        for key in bench_set.keys():
            bench_set[key] = np.array(bench_set[key])
            bench_set[key] = (np.mean(bench_set[key]),
                              np.std(bench_set[key]))

print('ref scalar:')
for key in ref[0].keys():
    print('{}:'.format(key),ref[0][key])
print()
print('ref tuple:')
for key in ref[1].keys():
    print('{}:'.format(key),ref[1][key])
print()
print('dev scalar:')
for key in dev[0].keys():
    print('{}:'.format(key),dev[0][key])
print()
print('dev tuple:')
for key in dev[1].keys():
    print('{}:'.format(key),dev[1][key])
print()