Come on; admit it. You've done it. We all claim to not have, and we all go on and on about the merits, benfits, pros/cons, etc. of optimization. But, sometimes, it just darned fun to do.
in reply to Which way is faster?
Granted, in your above example, it was more foolish than functional. And, we all know the Knuth quote. But, we have all probably engaged in it in some form of another.
I think of it like golf -- not something I would ever dream of putting into production code, but fun to do when no one is "watching." Plus, it satisifies, on some levels, curiousity and our desire to judge ourselves against our peers.
Don't get me wrong, I am not advocating off the wall optimization techniques. I just thought someone should point out the fun in playing optimization speed games.