[Haskell-beginners] Double vs. Num
tim.v2.0 at gmail.com
Wed May 4 23:08:41 UTC 2016
I imagine that in this program when Double isn't specified the compiler
doesn't assign a "hardware optimized" number type. Consequently it isn't
using the specialized functions that are used for 64-bit floating point
numbers. When the program specifies it is receiving the "Double" values,
then it does use the "hardware optimized" data types.
On Wed, May 4, 2016 at 3:12 PM, Ben Rogalski <bwrogalski at gmail.com> wrote:
> I have found that using the type Double in a type signature causes my
> program to run much faster than if I use a type variable with a Num
> Is this common, and if so, why is explicitly using Double faster?
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners