Re: copy-bit macro

Mike Jagdis (mike@roan.co.uk)
Fri, 12 Dec 1997 09:24:10 +0000 (GMT/BST)


On 11 Dec 1997, Stefan Monnier wrote:

> "Theodore Y. Ts'o" <tytso@MIT.EDU> writes:
> > (1 << OUT_FLAG_NUMBER) : 0") both involve an assembly language
> > conditional jump instruction, which is expensive, because it involves
> > pipeline stalls, etc.
>
> Has it been measured ? I know that branch prediction is not 100%, but
> I'm just trying to make sure we're not trying to solve a non-problem (if the
> prediction works well, then the jump costs 0 (zero) cycles).

If you have (working) branch prediction the direct cost will be
negligible, if any. But the indirect cost is that you use a slot
in the branch table which means you might well take the full cost
somewhere else later...

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'