1. A method comprising, by a computing device: evaluating a decision tree in interpreted mode; collecting statistics while the decision tree is evaluated in interpreted mode; representing the decision tree as source code; annotating each decision in the decision tree with instructions determined based on the collected statistics; and compiling the source code into machine code, the machine code being optimized based on the instructions annotating each decision in the decision tree.