in reply to Re^4: Simple regular expression problem
in thread Simple regular expression problem

While that looks impressive and is certianly intersting, you missed my point. Even with that huge difference you are still talking about fractions of a second unless you are dealing with several 1k records at least. If you are only doing 100 matches, or even 1,000 matches you arn't going to see the difference. Are there certain things to optimize for when you are using large strings and large datasets? Of course. Are those optimizations things that you should always keep in mind? I don't think so. In this case I beleive that a clear meaning is better, now either solution might be clearer depending on the situation and the programmer. However my point was that your benchmark shouldn't cause anyone to avoid '?' in general just because of performance. There are certainly cases where you are right (for instance 10k strings that are 200+ characters long.), but I think for most general cases the performance differnce is minor and insignificant.


___________
Eric Hodges
  • Comment on Re^5: Simple regular expression problem