Skip to content

Instantly share code, notes, and snippets.

@philippbayer
Created April 10, 2012 04:31
Show Gist options
  • Save philippbayer/2348324 to your computer and use it in GitHub Desktop.
Save philippbayer/2348324 to your computer and use it in GitHub Desktop.
Python vs Ruby
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