Dynamically switch between alias table and sequential binomial sampling