Created
May 25, 2013 14:07
-
-
Save marcelcaraciolo/5649171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
common_setup = """ | |
import numpy | |
from crab.metrics import cosine_distances | |
X = numpy.random.uniform(1,5,(1000,)) | |
""" | |
bench = Benchmark(statement, setup_bk1, name="Crab Cosine") | |
suite = BenchmarkSuite() | |
suite.append(bench) | |
statement = "cosine_distances(X, X)" | |
runner = BenchmarkGitRunner(suite, '.', 'Absolute timing in ms') | |
n_benchs, results = runner.run() | |
runner.plot_history(results) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment