Created
February 14, 2013 13:34
-
-
Save 153957/4952812 to your computer and use it in GitHub Desktop.
In the early version of Gist 4731132 I tested the speed of some retrieving some information from a h5 file.
I thought a difference was found when certain steps where skipped.
When testing my code in that gist today I found that the various methods gave the same results.
Apparently the part that caused the speed difference was the one thing that …
This file contains hidden or 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
import timeit | |
r_relative = timeit.Timer(stmt="read = tables.openFile('[path relative to cwd].h5', 'r'); read.close()", setup='import tables') | |
min(r_relative(2000, 100)) | |
# 0.04840588569641113 | |
r_absolute = timeit.Timer(stmt="read = tables.openFile('[path starting with /].h5', 'r'); read.close()", setup='import tables') | |
min(r_absolute.repeat(2000, 100)) | |
# 0.00023484230041503906 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment