1. A computer implemented method comprising: storing a script comprising one or more basic blocks, wherein each basic block is a set of instructions, the script using one or more untyped variables; storing a plurality of executable basic blocks corresponding to a basic block of the script, each executable basic block comprising code based on a set of types of untyped variables used in the basic block; ranking the plurality of executable basic blocks based on a rate at which the sets of types of untyped variables of each executable basic blocks were encountered in the past; receiving a request to execute the basic block, the request identifying an input set of types of untyped variables of the basic block; matching the input set of types of untyped variables with the set of types of untyped variables corresponding to executable basic blocks from the plurality of executable basic blocks, the matching performed in order of the rank of the plurality of executable basic blocks; selecting an executable basic block based on the matching; and executing the selected executable basic block.