> How about perl instead? (I don't think egrep is a fair test, it > doesn't have to 'do anything' with the results, like create a new > string from them). This is a rough perl equivalent of my original > problem:
I guess that's the point I was trying to get across - the overhead of creating all those strings (and whatever other temporary objects have to be created behind the scenes) might be significant. Ditto in perl, perhaps, I really wouldn't know. There's of no reason why the underlying RegEx implementation needs to be inefficient if it's well written. As Michael Ash has been kind enough to document, object instantiation is quite expensive : http://www.mikeash.com/?page=pyblog/performance-comparisons-of-common-operations.html But of course, if you need to break your original text up into NSString's, there's not much you can do about it. I'm sorry Bill, but the more I hear about GC and in particular the difficulties of using it with malloc'd memory the gladder I am not to be using it. I guess that one should not be surprised that it is difficult to retro-fit it in the way that you are forced to. Caveat emptor! Rgds - Paul Sanders _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com