
27 Mar
2010
27 Mar
'10
7:03 p.m.
Lennart Augustsson wrote:
It's important to switch from mod to rem. This can be done by a simple abstract interpretation. I'm nore sure if it's jhc or gcc that does this for jhc.
It's not just adding rem. Ghc still runs much slower using rem. It's only when switching to -fvia-C and using rem that ghc gets close to gcc speed (even though, still slower). Now jhc seems to get it fast right away. What's going on here? Is ghc backend wrose than using gcc as a backend (which is what via-C seems to accomplish)? Are there cases when one way is preferred over the other? What are the tradeoffs here?