[GHC] #12022: unsafeShiftL and unsafeShiftR are not marked as INLINE

GHC ghc-devs at haskell.org
Fri May 20 01:09:14 UTC 2016


#12022: unsafeShiftL and unsafeShiftR are not marked as INLINE
-------------------------------------+-------------------------------------
        Reporter:  Rufflewind        |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  libraries/base    |              Version:  7.10.3
      Resolution:                    |             Keywords:  performance,
                                     |  inline, bits
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 More importantly, the note is nonsense. Things not marked `INLINE` or
 (more strongly) `INLINE CONLIKE` sometimes won't be inlined even though
 they can be, once the code around them gets complicated enough. An
 operation like an unsafe shift, mask, etc., that's literally cheaper than
 a function call should *always* be inlined, unless I'm extremely confused.

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


More information about the ghc-tickets mailing list