If we have a value $x$ that is known modulo all primes less than $p$, how quickly can we determine its value?
In other words, we know $x \bmod 2$, $x \bmod 3$, $x \bmod 5$, etc... We also know that $x$ is a natural number or $0$, i.e. $x$ is not negative.. How quickly, asymptotically, can we determine $x$, assuming $x$ is uniquely determined by the set of primes used? I mean here that $x < 2 \cdot 3 \cdot 5 \cdot \cdots p$. I'm looking for bounds in terms of $p$.
The Chinese Remainder Theorem says that given relatively prime $\left\{p_i\right\}_{i=1}^n$ and any $\left\{x_i\right\}_{i=1}^n$ we can find an $x$ that satisfies $$ x\equiv x_i\pmod{p_i}\tag{1} $$ for all $i$ and that $x$ is unique mod $P=\prod\limits_{i=1}^np_i$.
To facilitate solving $(1)$ for each given $\left\{x_i\right\}_{i=1}^n$, we can compute $\left\{u_i\right\}_{i=1}^n$ so that $$ \begin{align} u_i&\equiv1\pmod{p_i}\\ u_i&\equiv0\pmod{P/p_i} \end{align}\tag{2} $$ by solving the equation $$ a_ip_i+b_iP/p_i=1\tag{3} $$ using the Extended Euclidean Algorithm, and setting $u_i=b_iP/p_i$.
Then, for any $\left\{x_i\right\}_{i=1}^n$, $$ x=\sum_{i=1}^nx_iu_i\tag{4} $$ satisfies $(1)$.