Re: Bit testing

2010-11-11 Thread Uri Guttman
> "CH" == Chap Harrison writes: CH> I'm almost embarrassed to ask this, but I can't figure out a CH> simple way to construct a switch ('given') statement where the CH> 'when' clauses involve bit-testing. Here's the only way I've CH> figured out to build a switch statement that does t

Bit testing

2010-11-11 Thread Chap Harrison
I'm almost embarrassed to ask this, but I can't figure out a simple way to construct a switch ('given') statement where the 'when' clauses involve bit-testing. Here's the only way I've figured out to build a switch statement that does the trick. It seems unusually wordy, which makes me think t

Re: Benchmark puzzle

2010-11-11 Thread Uri Guttman
> "MM" == Mike McClain writes: MM> Thinking the number of inerations of the benchmark loop might be MM> low enough to affect the results I doubled it and reran the above MM> command. a good trick when using benchmark is to support a command line arg to set the iteration count with a de

Benchmark puzzle

2010-11-11 Thread Mike McClain
Hello List, A posting about splitting a string into n numbered groups of characters led me to write a short script exploring the ways to do so. Later I got to wondering how the various approaches compared so added benchmarking code. Last week I ran the script, made a minor cosmetic change and r