Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 14 lines (11 sloc) 0.37 kb
1 2 3 4 5 6 7 8 9 10 11 12 13
import timeit

import integrate0, integrate1, integrate2

number = 10
py_time = None
for m in ('integrate0', 'integrate1', 'integrate2'):
    print m
    t = min(timeit.repeat("integrate_f(0.0, 10.0, 10000000)", "from %s import integrate_f" % m, number=number))
    if py_time is None:
        py_time = t
    print " ", t / number, "s"
    print " ", py_time / t
Something went wrong with that request. Please try again.