Question
How do I program CGI?
Answer
Because this technology generally requires a fresh copy of the program to be executed for every CGI request, the workload could quickly overwhelm web servers, inspiring more efficient technologies such as mod_perl or ASP that allow script interpreters to be integrated directly into web servers as modules, thus avoiding the overhead of repeatedly loading and initializing language interpreters. However, this is only applicable for high-level languages that need interpreters. Such overloads can be avoided by utilizing languages like C. By using C or similar compiled languages it is possible to reach higher efficiency levels, because such programs terminate their execution cycle faster than interpreted languages with less operating system overload. The optimal configuration for any web application will obviously depend on application-specific details, amount of traffic, and complexity of the transaction; a software engineer analyzes these tradeoffs to determine the best implementation for a given task and budget.
— Source: Wikipedia (www.wikipedia.org)