it all depends on your system, but with a little tweak you can get a little more performance on xp and win2k, see here for a little more detail:
http://www.xs4all.nl/~bluez/datatalk/lowgo.htm#l2_cache
free xp speedup (l2 cache setting) 1 .. 5%
free xp speedup (l2 cache setting) 1 .. 5%
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
you are totally right, and yet i've tried it on three machines, and it worked on all three... even though even microsoft says it shouldn't work (follow the link through to the microsoft article)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
> CPU cache is hardware level not OS level
Hmm, the link states: Windows XP and Windows 2000 have some troubles
detecting the CPU's L2 cache. Changing the Registry setting forces Windows
to see it. I made the following code into an exe, and then tested it (after
booting into Safe Mode both times), with the following result:
Default Registry setting of 0 = 1800 ms (on average; 10 runs performed).
Registry setting set to 1024 = 1650 ms (on average; 10 runs performed).
So, having the setting at 1024 for the L2 cache (as opposed to the default
of 0 on my machine) has definitely sped up the code below. I know some
of you may say that a loop test is useless, but the fact remains that the
loop is sped up, so I see no harm in leaving the Registry at 1024 just in
case it somehow does help in speeding up something else.
Hmm, the link states: Windows XP and Windows 2000 have some troubles
detecting the CPU's L2 cache. Changing the Registry setting forces Windows
to see it. I made the following code into an exe, and then tested it (after
booting into Safe Mode both times), with the following result:
Default Registry setting of 0 = 1800 ms (on average; 10 runs performed).
Registry setting set to 1024 = 1650 ms (on average; 10 runs performed).
So, having the setting at 1024 for the L2 cache (as opposed to the default
of 0 on my machine) has definitely sped up the code below. I know some
of you may say that a loop test is useless, but the fact remains that the
loop is sped up, so I see no harm in leaving the Registry at 1024 just in
case it somehow does help in speeding up something else.

Code: Select all
start=GetTickCount_()
For r=1 To 200000000 : Next
MessageBox_(0,Str(GetTickCount_()-start),"",0)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.