Avoid exception throwing in performance-sensitive code – Daniel Lemire's blog
lemire.me