1. A method for reducing code size, the method comprising the acts of: identifying replaceable subsets of instructions at first locations in areas of infrequently executed instructions in a set of instructions and target subsets of instructions at second locations in the set of instructions, wherein each replaceable subset matches at least one target subset; if multiple target subsets of instructions match one replaceable subset of instructions, choosing one of the multiple matching target subsets as the matching target subset for the one replaceable subset based on whether the multiple target subsets are located in regions of frequently executed code; and replacing, for each of at least some of the replaceable subsets of instructions, the replaceable subset of instructions with an instruction to cause the matching target subset of instructions at the second location to be executed.