/c - use compiled (pre-compiled)
The command above executes the test.cs script in a "use compiled" mode.
The performance improvement in
this mode can be quite significant. In general, the overall performance is
influenced by two components: startup delay and runtime performance. The
runtime performance of the script is absolutely the same as the equivalent
executable. However startup delay has to be longer for a script as it
involves script engine initialization, script analysis and compilation...
Running scripts with /c switch is like running Web browser in cached mode. The
measurements of startup delay for a script on the average PC (P4 2.8GHz 1G of
RAM) shows about 45-60 ms overhead comparing to a standalone executable.
Thus measured execution time for the standard hello.cs script was
consistently around 110 ms.
Note: performance figures may vary from version to version.
Note: Because .csc file is just an assembly it is guaranteed to be valid only within the environment it is compiled on. It means that if you copy the script and it's .csc file on another PC with different .csc may not be valid there. Proper .config files will solve the problem in most of the cases (CS-Script is deployed with .config files for all script engine executables). If problem cannot be solved for what ever reason just delete .csc file and it will be generated correctly with the next script execution.
/ca - compiles the script file into
assembly (.csc)
/cd - compiles the script file into
assembly (.dll)
The command above compiles the test.cs script into compiled assembly test.dll without actual execution. This mode is logically identical to /ca . It differs only in the file extension. This mode is useful for converting a script to the assembly form for use in other applications (as any other class library assembly).