change @benchmark to @btime

This commit is contained in:
Bogumił Kamiński
2022-03-22 22:49:55 +01:00
parent 4a18a70154
commit 9ce92f5abe

View File

@@ -125,7 +125,6 @@ drama_prop = proptable(years, has_drama; margins=1)
# Code for listing 6.5 # Code for listing 6.5
using Plots using Plots
plot(names(drama_prop, 1), drama_prop[:, 2]; legend=false, plot(names(drama_prop, 1), drama_prop[:, 2]; legend=false,
xlabel="year", ylabel="Drama probability") xlabel="year", ylabel="Drama probability")
@@ -159,8 +158,8 @@ supertype(Symbol)
using BenchmarkTools using BenchmarkTools
str = string.("x", 1:10^6) str = string.("x", 1:10^6)
symb = Symbol.(str) symb = Symbol.(str)
@benchmark "x" in $str @btime "x" in $str;
@benchmark :x in $symb @btime :x in $symb;
# Code for section 6.7 # Code for section 6.7
@@ -185,8 +184,8 @@ s2 = inlinestrings(s1)
Base.summarysize(s1) Base.summarysize(s1)
Base.summarysize(s2) Base.summarysize(s2)
@benchmark sort($s1) @btime sort($s1);
@benchmark sort($s2) @btime sort($s2);
# Code for listing 6.8 # Code for listing 6.8