Well, since you said "for any function f" ... It's not true for, say, constant functions.
How's that so?
Calculating 2^C for any fixed C is an asymptotically constant-time operation.