This is already implemented using the Base.Experimental.@compiler_options macro. It should be mentioned though that https://github.com/JuliaDebug/JuliaInterpreter.jl can be quite a bit faster than Julia’s own interpreter, so depending on your use case you might even want to use that instead.
8 Likes