3 ms·
Simple answer: Leave in all range checks. If the compiler can determine that the range check will never be hit, or can partially optimize it (hoisting it out o
by TheLoneWolfling 13y ago
Simple answer:
Leave in all range checks. If the compiler can determine that the range check will never be hit, or can partially optimize it (hoisting it out of a loop, etc) great. Otherwise? It gets checked at runtime, which is typically not that expensive an operation anyways.