Then use the time
command of your Bash shell. For example, this times how long it takes to julia to start up and execute sin.(rand(100000))
and exit:
>> time julia -e "sin.(rand(100000))"
julia -e "sin.(rand(100000))" 3.06s user 0.08s system 99% cpu 3.154 total
Aside: note that usually, one times at the REPL and not inside functions. I’m not sure @btime
is made to be used inside functions. For example as Greg does in your other thread: Array performance Julia 0.6 vs 0.5 - #5 by greg_plowman.