So let's say I have a function of the form:

function f(x::Bool)
for i in 1:10000000
    *(bunch of stuff)*
    if x
        do something
    end
    *(even more stuff)*
end

As you can see I only need to evaluate this if statement once, but instead 
I'm (in theory) evaluating it millions of times.  How good is Julia's 
branch prediction?  Does Julia's JIT compiler recognize this and make it so 
the if statement is only evaluated once?

Reply via email to