blog.jj5.net (2003 to 2005)

*hides*

Fri Feb 6 00:34:00 UTC+1100 2004

Categories:

Well, this was pretty embarrassing.

There was a conversation that started on the win tech off-topic list about reversing a string.

There were some cool ones, and some 'not so cool but I wrote it in 5 seconds' ones, etc. It was interesting to see everyones opinions, methods etc.

At the end of the day, the one that I found the most impressive was the one that reversed the string by spitting the chars into an array and then calling Array.Reverse.

I took some time to 'bench-mark' some of them, with some crude tests. But I stuffed up one of my tests, namly the VB one. So it _seemed_ like this relatively straight-forward StringBuilder based VB code was running really fast. In the end it wasn't, but naturally I didn't discover this until _after_ I had posted telling everyone that it did.

Oh well.. I think I might just go an hide in a hole for the rest of the week.

John.


Copyright © 2003-2005 John Elliot