Messages in this thread | | | Subject | Re: Structure vs purism ? | From | Harald Wagener <> | Date | 21 Jan 1999 18:50:39 +0100 |
| |
Helge Hafting <helge.hafting@daldata.no> writes:
> > > [...] > > 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.
Another thing is that _sometimes_ gotos are an elegant way to impelemt transaction protocol lookalikes without too much fuzz...
- 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/
| |