The short answer is that it depends. The long answer is that shared memory is very very good in mod_perl situations. Some people go as far as to force CGI to compile all of the common subroutines when the server starts -- that way, they'll be available to any child that needs them in a shared memory page. If they had to be autoloaded occasionally during a request, each child would have its own copy in a fresh memory page.