RDTSC is the assembly instruction needed to read the current timestamp for the current core (not necessarily synchronized to the whole system). Modern RDTSCs do NOT read the cycle-count, because frequencies change due to "Turbo Boosts" and other such optimizations. (See here for more details: https://randomascii.wordpress.com/2011/07/29/rdtsc-in-the-ag...)
A modern RDTSC reads at the "base clock". If your base clock is 3.6 GHz, the RDTSC ticks at 3.6GHz (even if your processor can turbo to 4GHz or 5GHz like the i9-9900k). So RDTSC is not the same from processor-to-processor, but it is consistently the most granular micro-benchmarking clock available on x86 systems.
The main issue with RDTSC is that task-switches may cause your thread of execution to change cores or mess up your timing, especially in long runs. So Windows / Linux have higher-level performance counters that take task switches into account, but have lower granularity. For Windows, this is "QueryPerformanceCounter", which ticks on my system at roughly 3MHz. Still useful for microbenchmarks, and the guarantee for cross-thread behavior is useful more often than not.
Microsoft documents "QueryPerformanceCounter" as using rdtsc in most cases. https://docs.microsoft.com/en-us/windows/desktop/dxtecharts/...
The rdtsc instruction seems to take ~40 clocks or so according to Agner Fog's instruction tables. Suggesting you can get a high-speed clock in as little as 10ns on a 4GHz x86 computer should you use the raw assembly instruction.
Add a few nanoseconds for a function call, setting up the stack, and some math to "normalize" the rdtsc clock... and the CPUID to clear out pipelines... and 50ns total seems reasonable.
There are some slower clocks available from the motherboard or I/O system. But those should be avoided unless you are running a 2008-era x86 processor (Aka: Nehalem/Westmere. The only Intel processor with "Turbo" frequencies which changed RDTSC timing). Older systems don't have turbo, newer systems lock RDTSC to the base clock.
------------
Anyway, I'm no Javascript guru. But surely there's a way to pass the RDTSC instruction "up" from the assembly level to Javascript code? Or alternatively, maybe an OS-level timer function that's built on top of RDTSC. (QueryPerformanceCounter in windows, or CLOCK_MONOTONIC_RAW in Linux)