a method , machine readable medium , and system are disclosed . in one embodiment the method comprises collecting a loop trip count continuously during runtime of a region of code being executed that contains a loop , categorizing the trip count to identify one or more code modification techniques applicable to the loop , and dynamically applying the one or more applicable code modification techniques to alter the code that relates to the loop .