In article <9D************ ******@text.new s.virginmedia.c om>,
Bartc <bc@freeuk.comw rote:
>
<dj******@cscl ub.uwaterloo.ca .invalidwrote in message
news:gb******* ***@rumours.uwa terloo.ca...
>Since the subject has come up, here's one I've been waiting for an
excuse to post:
[...]
>I tested your reverse function against the simplest reverse function of my
own I could knock up. Mine was 6 to 20 times faster that yours, to reverse a
77-character string one million times on my machine.
So if there is a point to your version, I haven't quite grasped it.
I'd rather give my version to somebody who's posting an obvious
homework problem than yours.
Once you untangle it, it also demonstrates a few code-structure ideas
that are quite useful to have wrapped your brain around (not that
reversing a string in C is really a _good_ way to illustrate those),
and I like to think it provides a nifty example of how to build working
approximations to some high-level abstractions that C doesn't provide
natively.
dave
(specifically NOT claiming that "nifty" implies "useful in production code".)
--
Dave Vandervies dj3vande at eskimo dot com
None of my copies of K&R have a "screen". Should I apply for a refund?
--Chris Dollin in comp.lang.c