Ticket #1228 (closed defect: fixed)

Opened 23 months ago

Last modified 5 weeks ago

cairo performance is very bad

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

Description

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).

Attachments

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

Change History

Changed 23 months ago by guest

cairo performance benchmarking (random lines)

Changed 19 months 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 5 weeks 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.