[GHC] #13070: time after evaluation
GHC
ghc-devs at haskell.org
Mon Jan 9 13:07:35 UTC 2017
#13070: time after evaluation
-------------------------------------+-------------------------------------
Reporter: vanto | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone: 8.0.2
Component: GHCi | Version: 8.0.1
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* status: new => closed
* resolution: => invalid
Comment:
If you can figure out how to run ghci on a processor from 1974 then you
might get consistent runtimes from ghci. With a modern preemptive-
multitasking OS using virtual memory and running on a pipelining, branch-
predicting processor with many levels of caching, where a memory read
might cost 4 to 200 cycles depending what level of the cache it is in (or
orders of magnitude more if it's swapped out to disk!), you cannot add up
cycle counts like this any more. Unfortunately it does mean that there is
a significant, effectively random component of program runtime; that's the
cost of computers getting many thousands of times faster.
Even your processor's clock rate is not constant any more. It's increased
and decreased according to demand to save power when the processor is
idle, or to avoid overheating.
The numbers displayed by `:set +s` are the real times, and they are not
fixed because the real times are not fixed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13070#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list