It's probably not the 600 algorithms, it's more likely calling a C function with 600 parameters. I think this crashes already the compiler. It's a Chinese compiler.

Here's what I would do to test the effect of starthours and endhours. Run the script 24*24 times with any combination of start and end hours, and plot a histogram of the resulting profit factor. For running it 24*24 times, use this code:

NumTotalCycles = 24*24;
int Hour1 = Cycle/24;
int Hour2 = Cycle%24;

For the histogram, look into the code of workshop 8 - it uses a very similar approach.