[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3d highlights on dark colors
From: |
Miles Bader |
Subject: |
Re: 3d highlights on dark colors |
Date: |
Mon, 6 Nov 2000 21:56:34 +0900 (JST) |
Eli Zaretskii <address@hidden> writes:
> - pow is an expensive function; isn't there a way to avoid it?
Good point (although in the most common case, where there's only a
single 3d face in a window [e.g., the mode-line], it caches the GC).
I did some simple timings, and I measured (on a pentium 133):
pow (1.2, 0.5) -- 4.1 usec / call
sqrt (1.2) -- 1.5 usec / call
Since the best `boost' factor I could find is 0.5 anyway, it would be
acceptable, I think, to hard-wire it in and use sqrt instead, given that
it's 1/3 the cost.
I should also mention that everytime this code gets invoked, a shitload
of other expensive stuff happens too --
* At least one call to XAllocColor == server round-trip
* A call to an X GC-frobbing function == slow
* If the frame has a `screen-gamma' parameter, *3* calls to `pow'
etc.
...so a single call to pow/sqrt may be simply noise.
-Miles
- 3d highlights on dark colors, Miles Bader, 2000/11/06
- Re: 3d highlights on dark colors, Eli Zaretskii, 2000/11/06
- Re: 3d highlights on dark colors,
Miles Bader <=
- Re: 3d highlights on dark colors, Miles Bader, 2000/11/07
- Re: 3d highlights on dark colors, Miles Bader, 2000/11/07
- Re: 3d highlights on dark colors, Gerd Moellmann, 2000/11/08
- Re: 3d highlights on dark colors, Miles Bader, 2000/11/08
- Re: 3d highlights on dark colors, Gerd Moellmann, 2000/11/10
- Re: 3d highlights on dark colors, Miles Bader, 2000/11/10
- Re: 3d highlights on dark colors, Gerd Moellmann, 2000/11/13