TITLE: RAM simulating another RAM
QUESTION [7 upvotes]: (Cross-posted from cstheory-stackexchange)
The following fact seems to be used implicitly in cs theory, particularly algorithms. Given a RAM machine $M$ running in time $O(f(n))$, another RAM machine $M′$ can simulate $M$ in time $O(f(n))$. This differs from the case for Turing machines, where $M′$ may require $O(f(n) \log(f(n))$ time.
I say this is often used implicitly because many papers will simply say something like "run $M$, but keep track of certain auxiliary information as you do so". This is really simulating $M$, but for RAM machines the distinction is not so important because running times are not (asymptotically) affected.
Is there a reference for this theorem? I am summarizing the situation correctly?
EDIT:
Some questions were raised about what is meant by simulation. More precisely, that there exists a universal RAM $T$ such that, for any RAM machine $M(x)$ running in time $O(f(|x|))$, there is an encoding $e_M$ such that $T(e_m, x) = M(x)$ and $T(e_m, x)$ runs in time $O(f(|x|))$ as well. (The constant term may be different between $T$ and $M$).

REPLY [2 votes]: I think that the blow-up in time can be much worse than you describe, depending on the specific computational models that are used. For example, consider the function that accepts an input string $w$ of arbitrary length and outputs the double duplicate string $ww$. On a Turing machine with separate input and output tapes having heads that can move independently, then this output can be formed in linear time, essentially copying $w$ to the output tape and then sending the input tape head back to the start, and then copying it again, which takes about $3|w|$ time altogether. But if one instead has the two tape machine model with a single head reading both tapes together, then the former computation can be simulated, but it takes a lot more time. A direct implementation will have the head necessarily making a lot of back-and-forth motions in order to form the second copy of $w$, ferrying small pieces of it back and forth, and the time complexity will rise to something like $O(|w|^2)$. And I expect that one can describe much worse examples.
This kind of issue is precisely what makes the class $P$ of polynomial time computability so conveneint and robust as a notion of feasibility. Because all the various standard computational models can simulate each other with only polynomial time factors, the choice of any particular model of computability does not affect membership in $P$ or its cousins, such as NP, which are closed under these polynomial factors. 
But meanwhile, the point is that it doesn't really make sense to talk about, say, an $O(n^2)$ algorithm unless the particular model or class of models of computability has been understood. After all, one model's $O(n)$ can be another's $O(n^2)$ or worse.