Hi I don't think so. It is mainly numerical stuff. Since I cannot share my test data and my actual procedure I have created a minimal working example that shows the same trend though in a much smaller way.
Here is my example:
SetDirectory["C:\\Users\\username\\Documents\\"];
OutputBackup=$Output;
MessageBackup=$Messages;
debugFile=OpenWrite["Debug.txt",FormatType->OutputForm,TotalWidth -> Infinity];
logFile=OpenWrite["LogFile.txt",FormatType->OutputForm,TotalWidth -> Infinity];
AppendTo[$Output,debugFile];
AppendTo[$Messages,debugFile];
TotalPressure=30 10^5;
TotalPressureError=500 0.15/100 6894.75729; (*0.15% of full scale reading which is 500 psi *)
StaticPressure=2352011;
StaticPressureError=500 0.15/100 6894.75729; (*0.15% of full scale reading which is 500 psi *)
\[Gamma]=1.4;
TotalTemperature=20+273.15;
TotalTemperatureError=1;
WriteString[logFile,
StringJoin[
"MonteCarlo analysis took ",ExportString[
AbsoluteTiming[MCRes=Module[{P0x,px,Machx,T0x,Tx},
Table[
{
P0x=TotalPressure+RandomReal[{-TotalPressureError,TotalPressureError}],
px=StaticPressure+RandomReal[{-StaticPressureError,StaticPressureError}],
T0x=TotalTemperature+RandomReal[{-TotalTemperatureError,TotalTemperatureError}],
Machx=Sqrt[2/(\[Gamma]-1) ((P0x/px)^((\[Gamma]-1)/\[Gamma])-1)],
Tx=T0x/(1+(\[Gamma]-1)/2 Machx^2)},
{iMC,1,1000000}]];][[1]],"CSV"],"s to complete"]];
Close[logFile];
Close[debugFile];
When I run this from a brand new Mathematica 9.0 session it takes 20 seconds to execute.
When I run it from command line
"/cygdrive/c/Program\ Files/Wolfram\ Research/Mathematica/9.0/MathKernel.exe -script MinimalWorkingExample.m"
it takes 30 seconds to complete.
The type of operations performed are similar to the one I have to except that I have also a FindRoot and a loop that I made to converge over some values. Those will take time but my expectations were they ought to take the same time independently from the way you run it.