Re: Structure vs purism ?

Helge Hafting (helge.hafting@daldata.no)
Thu, 21 Jan 1999 08:47:01 +0100


[...]
> Just under 1000 goto's. Some of which are trivial. Goto's to one-liners,
> which are easily tidied. Other files are real snakes-nests. Following the
> trail of goto's as they double back on themselves is no fun for the brain,
> even less so for a CPU, as modern features such as branch prediction are
> misused. (Remember the branch prediction tables are a set size, and can
> only store results of a few jumps).
As far as I know - no branch prediction is invoked for a goto,
because the jump is unconditional - and fast.

Tidying up is generally a good thing, but make sure you don't
ruin any "fast-path" optimizations by doing so.
(That's where the common code path is a small place that fits in
the cpu cache, while all exceptional cases are treated elsewhere. Goto's
might be useful for doing that.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/