Replying to myself to #3:
Yes, there seems to be:
julia> @time funcs[2]()
0.000003 seconds (4 allocations: 160 bytes)
2
julia> @time Base.invokelatest(funcs[2])
0.000007 seconds (4 allocations: 160 bytes)
2
julia> @time funcs[2]()
0.000003 seconds (4 allocations: 160 bytes)
2
julia> @time Base.invokelatest(funcs[2])
0.000007 seconds (4 allocations: 160 bytes)
2
julia> @time funcs[2]()
0.000003 seconds (4 allocations: 160 bytes)
2
julia> @time Base.invokelatest(funcs[2])
0.000008 seconds (4 allocations: 160 bytes)
2
Replying myself to #2
No, it does not seem to help.
MethodError(App.TweetsController.index, (), 0x0000000000005c6c)
ERROR: MethodError: no method matching index()
The applicable method may be too new: running in world age 23660, while current world is 23678.
Closest candidates are:
index() at /Users/adrian/Dropbox/Projects/tweet_stats/app/resources/tweets/controller.jl:7 (method too new to be called from this world context.)
function index() :: HttpServer.Response
...
end
Looks like I need to start refactoring the way I load routes and controllers so they’re known to Julia at compile time.
@mbauman Thank’s so much for your help!