Skip to content

Instantly share code, notes, and snippets.

@fredrikekre
Created February 15, 2017 13:38
Show Gist options
  • Save fredrikekre/d329274741a7a6f6f71bbdc9e1f00ce9 to your computer and use it in GitHub Desktop.
Save fredrikekre/d329274741a7a6f6f71bbdc9e1f00ce9 to your computer and use it in GitHub Desktop.
using BenchmarkTools
function foo3()
A = 1:100
for i in zip(A, A, A)
# do stuff
end
end
function foo4()
A = 1:100
for i in zip(A, A, A, A)
# do stuff
end
end
function foo5()
A = 1:100
for i in zip(A, A, A, A, A)
# do stuff
end
end
function foo6()
A = 1:100
for i in zip(A, A, A, A, A, A)
# do stuff
end
end
function foo7()
A = 1:100
for i in zip(A, A, A, A, A, A, A)
# do stuff
end
end
function foo8()
A = 1:100
for i in zip(A, A, A, A, A, A, A, A)
# do stuff
end
end
function foo9()
A = 1:100
for i in zip(A, A, A, A, A, A, A, A, A)
# do stuff
end
end
function foo10()
A = 1:100
for i in zip(A, A, A, A, A, A, A, A, A, A)
# do stuff
end
end
function foo11()
A = 1:100
for i in zip(A, A, A, A, A, A, A, A, A, A, A)
# do stuff
end
end
@btime foo3()
@btime foo4()
@btime foo5()
@btime foo6()
@btime foo7()
@btime foo8()
@btime foo9()
@btime foo10()
@btime foo11()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment