You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Time::HiRes::bootstrap() use more local vars in registers vs global derefs
-each reference to a global var like qpc_res_ns or tick_frequency is 7
bytes in machine code, or a couple more bytes than 7. Since BOOT:{}
runs only once, and the chance 2 parallel BOOT:{} XSUBs in 2 different
my_perls is almost zero, and even if there are 2 parallel OS threads
executing, 1 OS thread isn't going help shave time off the 2nd OS thread.
So to reduce the number of 7 byte opcodes that are reading from the
global vars, maximize C auto vars as much as possible.
QueryPerformanceFrequency() internally on Win7 is around 1-3 ptr derefs
into NT's "VDSO" aka KUSER_SHARED_DATA. On Win2k, QPF() is a ring 0 call.
-slide indent level to the left b/c the Win32 code block is nested too
deep and almost ever statement would exceed 80 chars
-cache PL_modglobal to a register, PL_modglobal is a big U32 offset 0x698
into my_perl struct " 48 8B 9F 98 06 00 00 mov rbx, [rdi+698h] "
0 commit comments