The overhead involved in process creation can be reduced by techniques such as FastCGI that "prefork '' interpreter processes, or by running the application code entirely within the web server, using extension modules such as mod_perl or mod_php. Another way to reduce the overhead is to use precompiled CGI programs, e.g. by writing them in languages such as C or C++, rather than interpreted or compiled - on - the - fly languages such as Perl or PHP, or by implementing the page generating software as a custom webserver module.
cgi programs can be written in which languages
C or C++