lkml.org 
[lkml]   [1999]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Structure vs purism ?
Date
From

[...]
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.098 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site