I've long wanted to apply category theory to the ideas of optimization, to preserving semantics while changing performance.