Hi,
in a bid to promote julia a bit I’m trying to get it accepted as a supported language for an AI competition.
Unfortunately the competition requires short lived executions with strict timing constraints.
(this is related to my earlier post but I thought I’d better start a separate discussion)
I need to be able to run a julia script with consistent execution time.
Eg. if it is determined that a no-opt script takes 1s then a competition entry will be allowed 3s max.
I have found that even with BuildExecutable that about 1 in 15 runs goes 2s over the average for a no-op implementation (see some stats below).
Is there any way to get this more consistent? Maybe static compilation or doing a pre-compile that gets cached to files?
I have also tried my best to get it statically compiled with no luck (I tried several different versions even compiled from source ; with and without JULIA_HOME environment variable defined):
$ /stf/opt/julia-0.5.1/bin/julia --output-ji=x.ji --compile=all -J /stf/opt/julia-0.5.1/lib/julia/sys.so -H /stf/opt/julia-0.5.1/bin testcompile.jl
ERROR: UndefVarError: JULIA_HOME not defined
in load_juliarc() at ./client.jl:276
in process_options(::Base.JLOptions) at ./client.jl:231
in _start() at ./client.jl:321
in jl_apply at /home/centos/buildbot/slave/package_tarball64/build/ui/…/src/julia.h:1392 [inlined]
in true_main at /home/centos/buildbot/slave/package_tarball64/build/ui/repl.c:123
in main at /home/centos/buildbot/slave/package_tarball64/build/ui/repl.c:243
normal Julia
eg. 1.035582 seconds (288.30 k allocations: 12.316 MB, 6.38% gc time)
avg=2.683333333333334
execution times:
[2.0,1.99,2.04,2.06,2.06,2.05,2.05,3.0,2.03,2.03,2.36,1.94,3.47,6.79,4.38]
with BuildExecutable
eg. 0.985178 seconds (287.32 k allocations: 12.517 MB, 6.63% gc time)
avg=3.8993333333333338
execution times:
[1.78,4.09,3.07,3.52,3.86,3.5,4.05,4.09,3.44,3.22,3.52,7.13,5.5,3.86,3.86]