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

Ian Lynagh ian at
Fri Dec 14 22:18:06 CET 2012

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


More information about the Glasgow-haskell-users mailing list