Computing input length on a one-tape Turing machine
It cannot be computed in time $o(n\lg n)$.

Let $M$ be a machine which
given an input string $x$ 
halts with the size of $x$ 
written in binary on the tape.

We can add a simple (zero-space linear-time) DFA to $M$ 
to check if the size of the input is a power of two:
just check that the first bit is 1 and the rest is zero.

Let's assume that $M$ runs time $o(n \lg n)$. 
Then we can decide in time $o(n \lg n)$ that 
the size of input is a power of two.
In other words, the following language is 
decidable in $\mathsf{DTime}(n \lg n)$.
$$L = \{ 0^i \mid \exists k \ i = 2^k\}$$
It follows from $\mathsf{DTime}(o(n \lg n)) = \mathsf{Reg}$ 
that $L$ should be regular.
But it is easy to check that the language is not regular.
So $M$ cannot run in time $o(n \lg n)$.