[Haskell-cafe] Ridiculously slow FFI, or cairo binding?

Vincent Hanquez tab at snarc.org
Wed Nov 2 11:14:09 CET 2011

On 11/02/2011 10:10 AM, Eugene Kirpichov wrote:
> Oh. This is pretty crazy, I wonder what they're doing with GMP so much...
> I modified the Haskell program to use cairo directly, even with safe calls, 
> and it now takes the same time as the C program.
yep, i ended up doing the exact same thing for testing,

foreign import ccall "cairo_rectangle"
   my_rectangle :: CI.Cairo -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()

and just replacing the rectangle call make almost all the difference for me 
(almost as fast as C)


More information about the Haskell-Cafe mailing list