[GHC] #13070: time after evaluation

GHC ghc-devs at haskell.org
Tue Jan 10 13:03:25 UTC 2017


#13070: time after evaluation
-------------------------------------+-------------------------------------
        Reporter:  vanto             |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.0.2
       Component:  GHCi              |              Version:  8.0.1
      Resolution:                    |             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:                    |
-------------------------------------+-------------------------------------

Comment (by vanto):

 I would like to say a precision to avoid all confusions. I think it is a
 matter of importance. There is a difference between the frequency of the
 microprocessor and the clock cycles of an instruction set from the
 processor.[[BR]]
 Somebody said that real times are not fixed. Well, that is the problem. We
 speak about time, we speak about Physics. The time of which you speak is a
 relative (real) time. With this time you can't do a comparison of values
 because, as you say, it is not fixed. We need a referential to something.
 And something is the clock cycles of instruction set. The clock cycles of
 an instruction set from the CPU nevers varies. You can have 2GHz CPU or
 3GHz CPU, clock cycles never varies. [[BR]]
 Suppose you have an instruction set MOVX,X which move register
 from register in a core i7 CPU and takes 5 clock cycles. With 2Ghz CPU or
 with 3GHz CPU MOVX,X will always keep 5 clock cycles. The difference is in
 the speed of the processor. Do you understand this?[[BR]]
 If you compute starting from that you have a true time and you can make
 comparison with another values. [[BR]]
 Thus currently the number displayed by :set +s is a relative time which is
 useless, and the code which implements this is to be rewritten.[[BR]]
 Of course you can keep the code such as and not change it
 if it is appropriate to you. But I invite you to consider that.[[BR]]
 When some people are disturbed by something they don't know, they quickly
 close tickets. Let others give their opinions, please.[[BR]]

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13070#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list