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

Hi,
The actual thanks for tracking this down go to Vincent Hanquez for finding
that we're doing a lot of gmp calls (and for making me aware of ltrace),
and to Felipe Lessa for finding that this is caused by poor code generated
for cFloatConv :)
Your changes look identical to those that I made in my copy.
On Thu, Nov 3, 2011 at 11:41 AM, Axel Simon
Hi Eugene,
On 02.11.2011, at 17:34, Eugene Kirpichov wrote:
Heh.
Guess what! A simple {-# INLINE cFloatConv #-} helped to the same extent!
Axel, I think this change should be pretty easy to incorporate, and it probably makes sense to inline all other functions in Types.chs too.
I've added INLINE pragmas to all these odd c2hs marshalling functions. Could you pull and check if I've done it correctly?
Thanks for tracking this down!
Axel
Would you like me to send the trivial darcs patch or the gtk2hs team
will take care of this?
On Wed, Nov 2, 2011 at 7:29 PM, Felipe Almeida Lessa
wrote: On Wed, Nov 2, 2011 at 11:24 AM, Jean-Marie Gaillourdet
wrote: Hi Eugene,
did you try using the SPECIALIZE pragma? It is part of the Haskell 98 and Haskell 2010 specifications.
I don't think it's going to make any difference, as the core already have an specialized poor version. See my first e-mail.
-- Felipe.
-- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/
-- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/

Hi Axel,
When do you expect to publish an updated version of gtk2hs on hackage?
On Thu, Nov 3, 2011 at 1:02 PM, Eugene Kirpichov
Hi, The actual thanks for tracking this down go to Vincent Hanquez for finding that we're doing a lot of gmp calls (and for making me aware of ltrace), and to Felipe Lessa for finding that this is caused by poor code generated for cFloatConv :) Your changes look identical to those that I made in my copy. On Thu, Nov 3, 2011 at 11:41 AM, Axel Simon
wrote: Hi Eugene,
On 02.11.2011, at 17:34, Eugene Kirpichov wrote:
Heh.
Guess what! A simple {-# INLINE cFloatConv #-} helped to the same extent!
Axel, I think this change should be pretty easy to incorporate, and it probably makes sense to inline all other functions in Types.chs too.
I've added INLINE pragmas to all these odd c2hs marshalling functions. Could you pull and check if I've done it correctly?
Thanks for tracking this down!
Axel
Would you like me to send the trivial darcs patch or the gtk2hs team will take care of this?
On Wed, Nov 2, 2011 at 7:29 PM, Felipe Almeida Lessa
wrote: On Wed, Nov 2, 2011 at 11:24 AM, Jean-Marie Gaillourdet
wrote: Hi Eugene,
did you try using the SPECIALIZE pragma? It is part of the Haskell 98 and Haskell 2010 specifications.
I don't think it's going to make any difference, as the core already have an specialized poor version. See my first e-mail.
-- Felipe.
-- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/
-- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/
-- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/
participants (1)
-
Eugene Kirpichov