Hi,
With Julia 0.3.0-prerelease+3609 (Commit 664cab5 (2014-06-10 05:18 UTC)) in
Arch Linux x86_64,
precompile() doesn't seems to effectively improve functions first call time.
For example, this code:
N = 10
A = rand(N,N)
B = rand(N,N)
function f(a, b)
c=a+b
c
end
@time precompile(f, typeof((A,B)));
@time f(A,B);
@time f(A,B);
@time f(A,B);
usually outputs something like
elapsed time: 0.001388013 seconds (21972 bytes allocated)
elapsed time: 0.001305722 seconds (1008 bytes allocated)
elapsed time: 7.486e-6 seconds (1008 bytes allocated)
elapsed time: 7.128e-6 seconds (1008 bytes allocated)
Isn't precompile supposed mitigate the first call time overhead?
Am I missing something?