1. A method comprising: receiving source code; compiling, via a processor, the source code to yield computer executable code, wherein compiling includes steps comprising: identifying a plurality of branches in the source code; determining a return address and a destination value for each branch of the plurality of branches; based on the return address and the destination value for each branch, constructing a binary tree data structure with nodes and leaf nodes, each node storing a constant value to yield constant values, and each leaf node storing a destination value to yield destination values, wherein the constant values are arranged such that searching the binary tree data structure by return address leads to a corresponding destination value; inserting the binary tree data structure in the computer executable code; and replacing each of the plurality of branches with instructions in the computer executable code for performing a branching operation based on the binary tree data structure.