[Haskell-cafe] slow code

brian briand at aracnet.com
Tue Jun 16 21:47:12 EDT 2009

On Jun 16, 2009, at 8:58 AM, Don Stewart wrote:

>> So I guess it's the show's, but I can't seem to find more efficient
>> float output.
>> FFI to sprintf ? yuch.
> Is your SMLNJ using lazy lists? :)

strictly speaking : no.

> Try hmatrix or uvector.

uvector is _probably_ the long term answer even after I solve the  
double -> string problem.

However, I would like to reiterate that it's the double -> string  
which is really the time/memory sink.  I verified this by printing a  
simple string based on the value (to make sure the value was  
evaluated) and it runs fast enough for me.

Is there an efficient way to output double -> binary ?

I typically write my data files as binary anyway, because it's faster  
for graph and the like to handle them anyway.


More information about the Haskell-Cafe mailing list