Re: [cairo] Re: Re: Re: cairo c++ bindings
- From: Murray Cumming <murrayc murrayc com>
- To: Mike Hearn <mike plan99 net>
- Cc: cairo cairographics org, gtkmm-list gnome org
- Subject: Re: [cairo] Re: Re: Re: cairo c++ bindings
- Date: Mon, 28 Nov 2005 10:33:02 +0100
On Fri, 2005-11-25 at 15:20 +0000, Mike Hearn wrote:
> On Fri, 25 Nov 2005 15:22:42 +0100, Murray Cumming wrote:
> > The function is probalby just returning an integer. And we would just if()
> > the result. Is that likely to be significant?
>
> I'm not sure. For an immediate mode API like Cairo I suspect it could be.
> OpenGL implementations usually optimize the function call overhead a lot:
> for instance with vertex arrays, with optimized TLS implementations and so
> on.
>
> When you're doing animation, and you want to throw a bazillion
> function calls per second through a library, cycle-level
> optimization becomes interesting.
>
> As to the result of a function call and an if statement: it might be
> significant. It means a pipeline-stalling comparison for every function
> call. Also, on some platforms like MacOS X cross-library calls are very
> slow.
So, this remains a highly theoretical performance issue, but one that
could easily be tested.
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.
Murray
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]