Ticket #1228 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

cairo performance is very bad

Reported by: guest Owned by: paolo
Priority: normal Milestone:
Component: Cairo bindings Version:
Keywords: performance Cc: claudiusmaximus@…


I first generate 100,000 random lines. Drawing them with the cairo package takes 99 seconds. Drawing them with safe foreign imports takes 15 seconds. I haven't benchmarked unsafe foreign imports.

The 6.6x slowdown is rather high.

Benchmarking code attached. It might fail on systems where Double /= CDouble (a possible cause of the slowdown might be conversion between these).


bench.hs (3.2 kB) - added by guest 6 years ago.
cairo performance benchmarking (random lines)

Change History

Changed 6 years ago by guest

cairo performance benchmarking (random lines)

Changed 6 years ago by guest

Adding a link to the recent relevant discussion which indicates that float conversion suboptimality is probably to blame: http://www.haskell.org/pipermail/haskell-cafe/2011-November/096562.html

Changed 4 years ago by dmwit

  • status changed from new to closed
  • resolution set to fixed

Per the discussion on the mailing list, all the conversion functions are marked {-# INLINE #-} now.

Note: See TracTickets for help on using tickets.