> > because I recon eliminating the exception handler is more 
> important than
> > speeding up the actual malloc/free.
> 
> Hmm...

alright, here's some quick benchmarks using 4.08.1:

1e6 * "bracket"              = 0.20 secs
1e6 * "bracket+malloc/free"  = 0.69 secs
1e6 * "malloc/free"          = 0.40 secs
1e6 * "allocate ByteArray"   = 0.13 secs

Ok, so the malloc/free is the most expensive part.  I'm moderately
surprised :)  Perhaps we could do a better job, but we'll never do
better than ByteArrays as long as the bracket is required.

Cheers,
        Simon

_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to