# Is it admited to give the complexity of a function regarding the resulting data structure?

Assume that we have a data structure which uses $O(\log n)$ space to store an integer $n$ and has a function $f$ which replaces the integer $n$ stored by $2^n$, i.e. $n=2^n$.

The time complexity of $f$ is $O(n_{_{old}})$ = $O(\log\ n_{_{new}})$, is it admited to say that $f$ is a $O(\log n)$ function ?

The running time of a function is usually measured with respect to the length of the input, which is represented by the parameter $n$. In your case, if the input is the integer $m$ then the input length is $n = \log m$ and the running time is $O(m) = O(2^n)$.
No. The input for $f$ is $n_{\text{old}}$, which, as you mentioned, is stored using $O(\log n_{\text{old}})$ space. Thus the upper bound $O(n_{\text{old}})$ on the time complexity of $f$ is actually exponential in the input size, so all you can say is that $f$ is computable in $O(2^n)$.