From 9ce92f5abe045350112963cfce7df188525b5f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Tue, 22 Mar 2022 22:49:55 +0100 Subject: [PATCH] change @benchmark to @btime --- ch06.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ch06.jl b/ch06.jl index 1f51253..2b08b29 100644 --- a/ch06.jl +++ b/ch06.jl @@ -125,7 +125,6 @@ drama_prop = proptable(years, has_drama; margins=1) # Code for listing 6.5 using Plots - plot(names(drama_prop, 1), drama_prop[:, 2]; legend=false, xlabel="year", ylabel="Drama probability") @@ -159,8 +158,8 @@ supertype(Symbol) using BenchmarkTools str = string.("x", 1:10^6) symb = Symbol.(str) -@benchmark "x" in $str -@benchmark :x in $symb +@btime "x" in $str; +@btime :x in $symb; # Code for section 6.7 @@ -185,8 +184,8 @@ s2 = inlinestrings(s1) Base.summarysize(s1) Base.summarysize(s2) -@benchmark sort($s1) -@benchmark sort($s2) +@btime sort($s1); +@btime sort($s2); # Code for listing 6.8