By: anon (anon.delete@this.anon.com), February 19, 2013 1:56 am
Room: Moderated Discussions
Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on February 18, 2013 5:14 pm wrote:
> Linus Torvalds (torvalds.delete@this.linux-foundation.org) on February 17, 2013 4:08 pm wrote:
> > Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on February 17, 2013 1:47 pm wrote:
> > >
> > > One condition bit for arithmetic and logical operations is enough,
> > > more than 90% of the time you only need a zero/non-zero
> > > result.
> >
> > Not true.
> >
> > I just checked. At least for Linux, compare-against zero is just
> > under 80% of the conditional branches. Not "more than 90%".
>
> That's not at all what I measured. In GCC, there are just 1609 non-compare ALU instructions
> followed by a branch are for equality. 94% of those are for equality. Just 3 instructions,
> adds, subs and movs followed by beq/bne account for 80%.
Are you measuring static or dynamic instructions?
> Linus Torvalds (torvalds.delete@this.linux-foundation.org) on February 17, 2013 4:08 pm wrote:
> > Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on February 17, 2013 1:47 pm wrote:
> > >
> > > One condition bit for arithmetic and logical operations is enough,
> > > more than 90% of the time you only need a zero/non-zero
> > > result.
> >
> > Not true.
> >
> > I just checked. At least for Linux, compare-against zero is just
> > under 80% of the conditional branches. Not "more than 90%".
>
> That's not at all what I measured. In GCC, there are just 1609 non-compare ALU instructions
> followed by a branch are for equality. 94% of those are for equality. Just 3 instructions,
> adds, subs and movs followed by beq/bne account for 80%.
Are you measuring static or dynamic instructions?