[GHC] #13629: sqrt should use machine instruction on x86_64

GHC ghc-devs at haskell.org
Sat Apr 29 13:44:13 UTC 2017


#13629: sqrt should use machine instruction on x86_64
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler (NCG)    |              Version:  8.0.1
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime           |            Test Case:
  performance bug                    |  numeric/num009
      Blocked By:                    |             Blocking:
 Related Tickets:  #13570            |  Differential Rev(s):  Phab:D3508
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by kavon):

 This is really interesting, thanks for looking into it!

 I'm not sure whether there are real programs that will benefit if we
 inline this library call by using x87 instructions. I'll leave that to
 someone who has a better intuition about whether there are
 graphics/mathematics programs that would appreciate the attention.

 We're at least no worse than C/C++ in this regard, though we probably pay
 a slightly higher call-site penalty due to a register mismatch between C
 and GHC conventions.

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


More information about the ghc-tickets mailing list