Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU time very inaccurate on Windows 11 #779

Open
slaymaker1907 opened this issue Dec 9, 2023 · 0 comments
Open

CPU time very inaccurate on Windows 11 #779

slaymaker1907 opened this issue Dec 9, 2023 · 0 comments

Comments

@slaymaker1907
Copy link

On Windows 11 with an Intel 13900, the following causes incorrect reporting of CPU time:

(define (fibo n)
  (if (> n 2)
      (+ (fibo (sub1 n))
         (fibo (- n 2)))
      1))
(time (fibo 42))

One such execution gave me the output:

> (time (fibo 42))
(time (fibo 42))
    no collections
    0.453125000s elapsed cpu time
    0.809243000s elapsed real time
    0 bytes allocated
267914296

However, if I set affinity of the process to CPU 0 (locking it to one core), it correctly computes the CPU time.

> (time (fibo 42))
(time (fibo 42))
    no collections
    0.828125000s elapsed cpu time
    0.855630300s elapsed real time
    0 bytes allocated
267914296

I've tested this many times and have even seen this behavior on the non-threaded version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant