I've been using Cairo Graphics in c for a while and I'd like to use it in a more high-level language (namely Haskell, I've also tried Python). It works but truthfully, I don't have a clear picture in my head on how that works internally.
When my Haskell source is compiled, is the cairo-related part of the object file the same as if it had been compiled from a c source ?
cairo_line_to (cr, 100, 100)
LineTo 100 100
There's some FFI overhead from most languages calling C libraries. It's a small (usually-)constant overhead on each call to a C function, but it will add up if you make lot of calls.
This isn't unique to calling C, for what it's worth. Any crossing of memory management systems does the job. That's why modern OpenGL recommends doing as much as possible in calls that send data to graphics memory in giant blocks, instead of one triangle at a time.