As someone pointed out, you could have an attribute that says ‘optimize the heck out of this routine’, and your definition of heck would be a parameter to the optimizer.