06 October 2025 11:43:34 AM TIMER_CLOCK C++ version Demonstrate the use of the CLOCK timer. CLOCK is a C++ library routine (defined in ) It returns the processor time used by the program since the beginning of program execution. Divide this by CLOCKS_PER_SEC to convert to seconds. CLOCK is a crude timer, and results less than a tenth of a second are probably not reliable. The number of clock ticks per second is 1000000 TEST01 Time the RAND function by computing N values. For a given N, repeat the computation 5 times. Data vectors will be of minimum size 1 Data vectors will be of maximum size 16777216 CPU times are in seconds. N Rep #1 Rep #2 Rep #2 Rep #4 Rep #5 Min Ave Max 1 1e-06 0 1e-06 0 0 0 4e-07 1e-06 2 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 8 0 1e-06 1e-06 1e-06 0 0 6e-07 1e-06 16 1e-06 0 0 0 1e-06 0 4e-07 1e-06 32 1e-06 1e-06 1e-06 1e-06 1e-06 1e-06 1e-06 1e-06 64 1e-06 1e-06 1e-06 2e-06 2e-06 1e-06 1.4e-06 2e-06 128 2e-06 3e-06 3e-06 2e-06 2e-06 2e-06 2.4e-06 3e-06 256 5e-06 4e-06 5e-06 5e-06 4e-06 4e-06 4.6e-06 5e-06 512 9e-06 8e-06 9e-06 8e-06 9e-06 8e-06 8.6e-06 9e-06 1024 1.8e-05 1.8e-05 1.7e-05 1.7e-05 1.7e-05 1.7e-05 1.74e-05 1.8e-05 2048 3.5e-05 3.4e-05 3.4e-05 3.4e-05 3.5e-05 3.4e-05 3.44e-05 3.5e-05 4096 8.1e-05 6.7e-05 6.7e-05 6.6e-05 7e-05 6.6e-05 7.02e-05 8.1e-05 8192 0.000138 0.000135 0.000135 0.000135 0.000135 0.000135 0.0001356 0.000138 16384 0.000278 0.000272 0.000271 0.00027 0.000273 0.00027 0.0002728 0.000278 32768 0.000552 0.000568 0.000525 0.000527 0.000537 0.000525 0.0005418 0.000568 65536 0.001066 0.001023 0.001022 0.001022 0.001021 0.001021 0.0010308 0.001066 131072 0.002133 0.002046 0.002056 0.002048 0.002045 0.002045 0.0020656 0.002133 262144 0.004258 0.00398 0.003701 0.003706 0.003667 0.003667 0.0038624 0.004258 524288 0.007801 0.007336 0.007372 0.007335 0.007335 0.007335 0.0074358 0.007801 1048576 0.016449 0.014966 0.014891 0.014884 0.015109 0.014884 0.0152598 0.016449 2097152 0.030951 0.029744 0.02953 0.029451 0.029563 0.029451 0.0298478 0.030951 4194304 0.061563 0.058724 0.059435 0.058789 0.058753 0.058724 0.0594528 0.061563 8388608 0.123694 0.117517 0.117614 0.118102 0.120052 0.117517 0.119396 0.123694 16777216 0.249806 0.236002 0.235536 0.237223 0.235928 0.235536 0.238899 0.249806 TIMER_CLOCK Normal end of execution. 06 October 2025 11:43:37 AM