I think this is Julia’s compiler acting before the benchmark code can. As @time
’s docstring states:
In some cases the system will look inside the
@time
expression and compile some of the called code before execution of the top-level expression begins. When that happens, some compilation time will not be counted. To include this time you can run@time @eval ...
.
@time
didn’t measure compilation times separately in the past, and the feature was introduced to separate it from the execution time of interest, not measure all of the compilation. There is a workaround at least, though I don’t know how @eval
prevents the compiler from acting too soon if the code ran in the global scope to begin with.