Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
20484 commits behind the upstream repository.
Dominic Steinitz's avatar
idontgetoutmuch authored
Currently we have this in libraries/base/GHC/Float.hs:
```
abs x | x == 0    = 0 -- handles (-0.0)
      | x >  0    = x
      | otherwise = negateFloat x
```
But 3-4 years ago it was noted that this was inefficient:
https://mail.haskell.org/pipermail/libraries/2013-April/019690.html

We can generate better code for X86 and llvm and for others generate 
some custom cmm code which is similar to what the compiler generates 
now.

Reviewers: austin, simonmar, hvr, bgamari

Reviewed By: bgamari

Subscribers: dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D3265
12ccf767
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.