The code you're showing here will take no time at all to run under mod_perl since it will be compiled into constants on the first request. However, keep in mind that we're talking about the first request per process, so you may hit a different child process each time on your first few clicks. An easy way to tell is it to put something like this in your script: