make handles bold.

This commit is contained in:
ed committed 2026-08-25 16:26:52 -04:00
1 parent f577242432
commit 69b87777e5
728 files changed
+3291 -3087

No files matched your search

@@ -26,21 +26,21 @@ parent_post_id: "2060730425929080874"
## Branch
**1/** @FUZxxl
**1/** **@FUZxxl** ^2060885487858880689
@NOTimothyLottes
**@NOTimothyLottes**
If you do the multiply in uint128_t and then right-shift by 64 places, the compiler should do the right thing.
**2/** @NOTimothyLottes
**2/** **@NOTimothyLottes** ^2060898306851516562
@FUZxxl
**@FUZxxl**
“Should” is exactly why I prefer the actual instruction instrinsics or just inline asm (which is what I use on C CPU land)
**3/** @FUZxxl
**3/** **@FUZxxl** ^2061000558698197386
@NOTimothyLottes
**@NOTimothyLottes**
Have fun with a solution that the compiler optimises worse and that is not portable.
@@ -25,7 +25,7 @@ in_reply_to: ""
## Thread
**1/** @NOTimothyLottes
**1/** **@NOTimothyLottes** ^2060730425929080874
Renovating CPU clock code. I'm assuming x86-64 TSC is always >= 1 GHz so that conversion of clock counter diff to nanoseconds is simply a MUL instruction fetching the RDX high 64-bit result (of the 128-bit computed). But figuring out how to do the inline asm was a pain.
@@ -33,10 +33,10 @@ Renovating CPU clock code. I'm assuming x86-64 TSC is always >= 1 GHz so that co
Branches: [[archive/threads/NOTimothyLottes/2026-05-30-renovating-cpu-clock-code/2026-05-31-FUZxxl-if-you-do-the-multiply-in-uint128-t-and-then]]
**2/** @NOTimothyLottes
**2/** **@NOTimothyLottes** ^2060742129190568413
Looks like NtQuerySystemInformation() with SystemHypervisorSharedPageInformation (aka 0xc5) gives 64-bit scalar for TSC that converts time to units of 10 MHz. So the smart way is to work in units of TSC, then do a subtraction of TSC terms, then MULHI to get {ms, us, or ns} time
**3/** @NOTimothyLottes
**3/** **@NOTimothyLottes** ^2060752921092833490
https://gist.github.com/pmttavara/6f06fc5c7679c07375483b06bb77430c - A great reference for getting TSC scaling multipliers on Linux and Windows