Re: Fixed point cairo.. or no cairo?
- From: Behdad Esfahbod <behdad behdad org>
- To: Aivars Kalvans <aivars kalvans inbox lv>
- Cc: performance-list gnome org
- Subject: Re: Fixed point cairo.. or no cairo?
- Date: Mon, 21 Aug 2006 23:11:17 -0400
On Mon, 2006-08-21 at 19:16 -0400, Aivars Kalvans wrote:
> Behdad Esfahbod wrote:
> > - If I compile with anything other than -O0, I get all zeros printed.
> > Any optimization level makes gcc drop the inline assembly away.
> > Incidentally, no optimization is hardly the best thing to profile.
> >
> Adding "volatile" will keep assembly:
Ah, I tried "volatile asm" and that didn't work...
This just confirmed that an optimized branch on x86 is basically free:
overhead: 43 cycles
overhead: 43 cycles
branching: 43 cycles
branching: 51 cycles
function call: 77 cycles
inline multiply: 60 cycles
The overhead is constant on 43. The branching cost goes up and down,
but a lot of times I get 43, which means the conditional is essentially
free in the pipeline.
> asm volatile (".byte 0x0f, 0x31" : "=A" (start));
>
--
behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]