Author Topic: Michael Webster's code timing macros  (Read 8603 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4753
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Michael Webster's code timing macros
« Reply #15 on: September 13, 2016, 12:40:44 AM »
Hehe, I still time algos with GetTickCount with a long enough sample. What you will have PHUN with is the Win10 64 thread scheduling that is all over the place. A recent thread test I have done and posted here shows how patchy the scheduling is in that the thread completion order is nowhere near the thread start order.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: Michael Webster's code timing macros
« Reply #16 on: September 13, 2016, 04:07:25 PM »
Try AffinityMasks 1 & 3 so they run on separate cores.

Well Microsoft, here’s another nice mess you’ve gotten us into.

Raistlin

  • Member
  • **
  • Posts: 233
Re: Michael Webster's code timing macros
« Reply #17 on: September 13, 2016, 04:20:16 PM »
Code: [Select]
44
48

Threads running on any available core:
1: 220 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 222 cycles
2: 222 cycles
1: 220 cycles
2: 220 cycles
1: 221 cycles
2: 221 cycles
1: 220 cycles
2: 220 cycles
60
56

15
15

Threads running on separate cores:
2: 220 cycles
1: 221 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 221 cycles
2: 221 cycles
1: 221 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 220 cycles
2: 220 cycles
1: 221 cycles
2: 220 cycles
1: 220 cycles

HP Intel - i5 Prodesk 600 G1

TWell

  • Member
  • ****
  • Posts: 748
Re: Michael Webster's code timing macros
« Reply #18 on: September 13, 2016, 04:47:03 PM »
AMD Athlon II X2 220, 2 CPU's, Windows 10 Home 64-bit
Code: [Select]
88
92

Threads running on any available core:
1: 49 cycles
2: 49 cycles
1: 49 cycles
2: 49 cycles
1: 49 cycles
2: 0 cycles
1: 49 cycles
2: 49 cycles
2: 49 cycles
1: 49 cycles
1: 49 cycles
2: 0 cycles
1: 49 cycles
2: 49 cycles
1: 49 cycles
2: 49 cycles
104
96

3
3

Threads running on separate cores:
2: 49 cycles
1: 58 cycles
2: 49 cycles
1: 49 cycles
2: 49 cycles
1: 56 cycles
2: 49 cycles
1: 62 cycles
2: 49 cycles
2: 49 cycles
1: 62 cycles
2: 49 cycles
1: 64 cycles
2: 49 cycles
1: 57 cycles
1: 49 cycles

Siekmanski

  • Member
  • *****
  • Posts: 1079
Re: Michael Webster's code timing macros
« Reply #19 on: September 13, 2016, 06:56:31 PM »
i7-4930K CPU Windows 8.1 ( AffinityMasks 1 & 3 )
Code: [Select]
40
44

Threads running on any available core:
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
2: 257 cycles
1: 257 cycles
60
52

4095
4095

Threads running on separate cores:
2: 282 cycles
1: 283 cycles
2: 262 cycles
1: 263 cycles
2: 256 cycles
1: 257 cycles
2: 255 cycles
1: 256 cycles
2: 255 cycles
1: 256 cycles
2: 258 cycles
1: 258 cycles
2: 255 cycles
1: 255 cycles
2: 255 cycles
1: 255 cycles

FORTRANS

  • Member
  • ****
  • Posts: 941
Re: Michael Webster's code timing macros
« Reply #20 on: September 14, 2016, 12:14:28 AM »
Hi,

   Windows 8.1, i3, laptop.

Code: [Select]
44
48

Threads running on any available core:
1: 284 cycles
2: 285 cycles
1: 268 cycles
2: 274 cycles
1: 280 cycles
2: 281 cycles
1: 282 cycles
2: 286 cycles
1: 271 cycles
2: 271 cycles
1: 271 cycles
2: 270 cycles
1: 268 cycles
2: 269 cycles
1: 266 cycles
2: 267 cycles
76
72

15
15

Threads running on separate cores:
2: 268 cycles
1: 268 cycles
2: 267 cycles
1: 268 cycles
2: 267 cycles
1: 268 cycles
2: 268 cycles
1: 268 cycles
2: 268 cycles
1: 268 cycles
2: 267 cycles
1: 268 cycles
2: 267 cycles
1: 268 cycles
2: 268 cycles
1: 268 cycles

Steve

TWell

  • Member
  • ****
  • Posts: 748
Re: Michael Webster's code timing macros
« Reply #21 on: September 21, 2016, 02:59:14 AM »
modified test13 build with mingw w64 v 6.2 without mingw headers and runtime.
so size is now 5 kb.
only minimal environment gcc.exe cc1.exe as.exe ld.exe are needed for compilation.

gcc binaries here

with this someone can compile own tests without full installations.

Gunther

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: Michael Webster's code timing macros
« Reply #22 on: September 21, 2016, 09:55:11 PM »
Results Windows 7, Desktop Computer:
Code: [Select]
32
36

Threads running on any available core:
2: 231 cycles
1: 237 cycles
2: 231 cycles
1: 242 cycles
2: 231 cycles
1: 238 cycles
2: 231 cycles
1: 237 cycles
2: 231 cycles
1: 240 cycles
2: 231 cycles
1: 239 cycles
2: 231 cycles
1: 237 cycles
2: 231 cycles
1: 236 cycles
48
44

255
255

Threads running on separate cores:
2: 257 cycles
1: 258 cycles
2: 257 cycles
1: 258 cycles
2: 258 cycles
1: 258 cycles
2: 257 cycles
1: 258 cycles
2: 257 cycles
1: 258 cycles
2: 258 cycles
1: 258 cycles
2: 258 cycles
1: 258 cycles
2: 258 cycles
1: 258 cycles

Gunther
Get your facts first, and then you can distort them.