Re: cairo c++ bindings
- From: Max Vasin <max vasin gmail com>
- To: gtkmm-list gnome org
- Cc: cairo cairographics org
- Subject: Re: cairo c++ bindings
- Date: Mon, 28 Nov 2005 23:02:30 +0300
Mike Hearn wrote:
On Mon, 28 Nov 2005 10:33:02 +0100, Murray Cumming wrote:
So, this remains a highly theoretical performance issue, but one that
could easily be tested.
Right.
If it is a problem, then the proposed disabling of exceptions would
mostly eliminate it, by leaving us with just one extra
if(exceptions_enable) for each function call. I can't imagine what you'd
be drawing for which that would be a significant amount of work.
Even better, make two classes (maybe using a template? I'm no C++ expert)
which have identical code except with a different initialization value for
the constant "exceptions_enable", that way the dead code elimination pass
will delete the check entirely and you have optimal code. Then the
programmer can just switch between them using "new CheckedCairo" or "new
Cairo" for instance.
Even better: make a single class template with error handling policy as
template parameter. No dead code at all. And programmer won't be limited
to error handling policy used by wrapper.
--
WBR, Max Vasin.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]