I am creating a web-based application which may need to scale up to millions of users; most of the site is in PHP, but some of the more complex areas are being handled by Perl.

I need to experiment soon with ways to speed up Perl execution, and I have been thinking about mod_perl and FastCGI.

Is there anyone who has had experience with both, and can tell me a few things:

1. As I understand it, we're talking somewhat apples & oranges here, but both are touted as replacements to standard CGI. Which is more likely to provide raw speed for multiple execution of the same script?

2. Are there any pitfalls I should be aware of with either?

3. Any ideas on benefits/drawbacks of each?

TIA for any replies...