[GHC] #9786: Make quot/rem/div/mod with known divisors fast

GHC ghc-devs at haskell.org
Mon Nov 10 02:21:10 UTC 2014


#9786: Make quot/rem/div/mod with known divisors fast
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:
                  Type:  task        |           Status:  new
              Priority:  normal      |        Milestone:  7.12.1
             Component:  Compiler    |          Version:  7.9
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Runtime     |       Blocked By:
  performance bug                    |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 It looks like https://gmplib.org/~tege/divcnst-pldi94.pdf is a good source
 for the algorithms involved. There are algorithms there both for what
 Haskell calls `quot` and what it calls `div`.

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


More information about the ghc-tickets mailing list