Skip to content
Snippets Groups Projects
Commit 0ba64c42 authored by idast772's avatar idast772
Browse files

Fixed the bottleneck in profiling.

parent ce57f30b
No related branches found
No related tags found
No related merge requests found
using BenchmarkTools using BenchmarkTools
using Random using Random
using Profile
function f() function f()
lst = rand(50000) lst = rand(50000)
for i in lst for i in lst
if i > 0.99 if i > 0.99
...@@ -9,6 +11,7 @@ function f() ...@@ -9,6 +11,7 @@ function f()
print(s) print(s)
end end
end end
end end
f() f()
...@@ -16,3 +19,7 @@ f() ...@@ -16,3 +19,7 @@ f()
x = @benchmark f() x = @benchmark f()
println() println()
println(x) println(x)
@profile f()
Profile.print()
Profile.clear()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment