Created
April 10, 2012 04:31
-
-
Save philippbayer/2348324 to your computer and use it in GitHub Desktop.
Python vs Ruby
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
min = 1000000000 | |
5.times do | |
t = Time.now | |
File.open("./backParsedTapidorContigs.csv").each do |r| | |
r.split("\t") | |
end | |
finish = (Time.now - t) | |
if finish < min | |
min = finish | |
end | |
end | |
puts min | |
------------------------------------ | |
import time | |
def parse(): | |
file_handle = open("./backParsedTapidorContigs.csv") | |
for line in file_handle: | |
line.split("\t") | |
tmin = float("inf") | |
for i in range(5): | |
t = time.time() | |
parse() | |
t = time.time()-t | |
if t < tmin: | |
tmin = t | |
print(str( tmin)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment