Created
September 4, 2016 04:07
-
-
Save ctb/ce69abe77a40e4936f42652dfd41cb38 to your computer and use it in GitHub Desktop.
Simple benchmarking script for khmer
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
import random | |
import timeit | |
dna = ['A', 'C', 'G', 'T'] * 10000 | |
random.seed(1) | |
random.shuffle(dna) | |
dna = "".join(dna) | |
import khmer | |
print(khmer) | |
kh = khmer._Nodegraph(31, [1]) | |
def fn(): | |
kh.get_kmer_hashes(dna) | |
print(timeit.timeit(fn, number=100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment