So perhaps a bit more than a couple of years, but my impression is also that they fell behind on (single-thread) performance for a long time after that.
I've also understood that in more ancient history AMD CPUs sometimes beat contemporary Intel parts in performance, although releasing their parts later than Intel. I'm not sure that's relevant to any remotely recent developments anymore though.
AMD was struggling to release CPUs that were competitive against year old Intel Core 2 Duos which remained the status quo through their Bulldozer architecture. Things started turning around with Ryzen when a combination of architecture improvements and typical workloads taking more advantage of multicore flipped the script.
The bits about "true" multicore are also sketchy considering Bulldozer was using shared L2, fetch/decode, and floating point hardware on each module and calling a module two "cores" for marketing purposes.
https://www.anandtech.com/show/4955/the-bulldozer-review-amd...
Nevertheless, the integration of multiple cores into an Intel multiprocessor was very inefficient before Nehalem (i.e. the cores were competing for a shared bus, which prevented them from ever reaching their maximum aggregate throughput, unlike in the AMD multiprocessors, which had inherited the DEC Alpha structure, with separate memory links and peripheral interfaces and with an interconnection network between cores, like all CPUs use now).
However this was noticeable at that time mostly in the server CPUs and much less in the consumer CPUs, as there were few multithreaded applications.
Core 2 still lagged behind AMD's cores for various less mainstream applications, like computations with big integers.
Only 2 generations later, after Core 2 and Penryn, with Nehalem (the first SKU at the end of 2008, but the important SKUs in 2009) Intel has become able to either match or exceed AMD's cores in all applications.
On the other hand, AMD's 90 nm CMOS process has been excellent.
With its 65 nm process, Intel has recovered its technological leadership, but that was not the most important factor of success, because AMD's 65 nm process was also OK and it became available within a few months of Intel's process.
AMD has lost because they did not execute well the design process for their "Barcelona" new generation of CPUs (made also in 65 nm, like Core 2). While Intel has succeeded to deliver Core 2 even earlier than their normal cadence for new CPU generations, AMD has launched Barcelona only after several months of delays and even then it was buggy. The bugs required microcode workarounds that made Barcelona slow in comparison with Core 2, and that started the decline of AMD, after a few years of huge superiority over Intel.
This was much more obvious in servers or workstations than in consumer devices, because the kinds of applications run by non-professionals at that time were much more sensitive to the high burst speeds offered by Pentium 4 with very high clock frequencies, than to the higher sustained performance of the AMD CPUs.
In 2005, I had both a 3.2 GHz Pentium 4 (Northwood, 130 nm) and a 3.0 GHz Pentium D (Prescott, 90 nm). With any of them, the compilation from sources of a complete Linux distribution took almost 3 days of continuous work of 24 hours per day.
After I bought an Athlon X2 of only 2.2 GHz, the time for performing the same task has been reduced to much less than a day. Even for some single-threaded tasks, but which contained many operations that were inefficient on Pentium 4, like integer multiplications or certain kinds of floating-point operations, the 2.2 GHz AMD CPU was several times faster than the 3.2 GHz Pentium 4.
At work, the domination of the AMD CPUs was even greater. Each server with Opteron CPUs that we bought was faster than several big racks with Sun or Fujitsu servers that were used before. Intel did not have anything remotely competitive. At the beginning of 2006, on my laptop with an AMD Turion I could run professional EDA/CAD programs much faster than on the big Sun servers normally used for such tasks. Intel had nothing like that (i.e. the 32-bit Intel CPUs could not use enough memory to even run such programs, so the question whether they could have run such programs fast enough was irrelevant).
Of course, half of year later the competition between Intel and AMD looked completely different.