3 ms·
Sure, because static typing doesn't mean you picked the best type, it just means that you picked a type. If you statically type your function as Integer -> Int
by jrockway 17y ago
Sure, because static typing doesn't mean you picked the best type, it just means that you picked a type.
If you statically type your function as Integer -> Integer because one invocation in a million uses an integer bigger than 2^63, you are taking a speed hit for the other 999,999 calls. But a tracing JIT can just use a machine integer those times, and only fall back to the arbitrary-size Integer when it needs to.