in reply to Re: fall through switch/case in perl
in thread fall through switch/case in perl
Actually, this is just a standard switch statement,-- not Duff's device.
On the clarity argument, it's very much in the eye of the beholder whether your if cascade (or the and cascade) is clearer than the computed-goto version?
For completeness, the computed goto version works out an average of over 60% faster than either of the cascade versions, which is rather more than a few dozen clock cycles.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: fall through switch/case in perl
by Aristotle (Chancellor) on Sep 07, 2004 at 03:21 UTC | |
by BrowserUk (Patriarch) on Sep 07, 2004 at 03:25 UTC |