You are measuring startup time, and Julia (still, despite major improvements) is known to have a slow startup time: it compiles your code every time you run a new Julia process. Basically,
is not how you should run Julia programs, at least not if the runtime of pangram.jl is less than a few minutes. Instead, you start a REPL / IJulia kernel or some other long running process and then run / include your Julia code in that.
In this case, in a new Julia REPL:
julia> function ispangram(input)
return ('a':'z' ⊆ lowercase(input))
end
ispangram (generic function with 1 method)
julia> input = "wjjqevffkkgbcehhiqpvqutmwxawzvjnbvukmlzxyhkgfddzfjhcujnlkjbdfgghjhujkiuytghjioplkjhgfdsaqwertyujioplkjhgfdsaqwertzuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkj"
"wjjqevffkkgbcehhiqpvqutmwxawzvjnbvukmlzxyhkgfddzfjhcujnlkjbdfgghjhujkiuytghjioplkjhgfdsaqwertyujioplkjhgfdsaqwertzuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwer
tyuioplkjhgfdsaqwertyuioplkjhgfdsazxcvbnmlkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkjhgfdsaqwertyuioplkj"
julia> ispangram(input)
true
julia> using BenchmarkTools
julia> @benchmark ispangram($input)
BenchmarkTools.Trial: 10000 samples with 8 evaluations.
Range (min … max): 3.641 μs … 245.906 μs ┊ GC (min … max): 0.00% … 96.62%
Time (median): 4.031 μs ┊ GC (median): 0.00%
Time (mean ± σ): 4.366 μs ± 7.129 μs ┊ GC (mean ± σ): 5.55% ± 3.35%
▃▆█▄▂
▂▅█▆▄▄▆▆▅▆█████▇▇▆▄▄▄▄▄▃▃▃▃▂▃▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▃
3.64 μs Histogram: frequency by time 5.41 μs <
Memory estimate: 7.01 KiB, allocs estimate: 10.