How do we best make sure {Int,Word,Float,Double} to {Int,Word,Float,Double} conversions stay efficient

Carter Schonwald carter.schonwald at gmail.com
Fri Dec 14 22:34:29 CET 2012


A related question I have is that I've some code that will map the
singleton Nats to Ints, and last time I looked into this/ had a chat on the
ghc-users list, it sounded like sometimes having Integer values constructed
in between are unavoidable.  Is that still the case with post 7.6.1 ghc?
(And or, how might I be able to help?)

On Friday, December 14, 2012, Ian Lynagh wrote:

> On Fri, Dec 14, 2012 at 12:53:36PM -0800, Johan Tibell wrote:
> >
> > I've been tracking down a few (unrelated) performance bugs related to
> > conversions between primitive types. What these issues had in common
> > is that some rule failed to fire and the conversion went via Integer,
> > killing performance. How do we best write a test that make sure that
> > fromIntegral conversions between these types don't regress? Is it
> > possible to test the output of the simplifier or do we have to do
> > something less direct, like writing a loop that does such conversions
> > and make sure that the allocation stay low?
>
> We have some tests looking at the -ddumjp-simpl output, e.g.
> integerConstantFolding. I'm not sure if we have one for type conversions
> OTTOMH.
>
>
> Thanks
> Ian
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20121214/1a154f26/attachment.htm>


More information about the Glasgow-haskell-users mailing list