Regex.CompileToAssembly... why?
I'm writing a little tool for one of my co-workers to parse the IIS logfiles for our public web site into traffic into two piles: traffic coming from our internal networks and everything else. While it's fairly easy, I'm finding that I've got about ten regular expression that I need to run each client IP address through. My program works OK, but it seems like its a bit slow. I'm only processing about 2,000 records per second from an USB 2.0 hard-drive and I've defragemented it. My thought is that the bulk of the processing time is going to into the comparison process. So I start poking around in the MSDN library and I see this .CompileToAssembly method. Not much help. I also Google on said and find a couple of interesting articles:
Why both of these examples are great demonstrations of how to use the method, neither are very good at why I would want to. Ideally, I'd like to see something that tells me if this is likely to be a good investment of my time to program in. I don't want to be a cargo culturalist, after all.
While "I contrive that the office of sense shall only be to judge of the experiment, and that the experiment itself shall judge of the thing," I don't want to bet my (Francis) Bacon on that effort today.
[Listening to: Numb as a Statue - Warren Zevon - The Wind (04:09)]