User forums > Help

Execution times are extremely slow, how to fix?

(1/1)

Sliverious:
I just started with C::B and C++, so I am unsure what is causing this to happen. I DL'ed 16.01+minGW today, and got it to work by resetting to default. The sad thing is, it's absurdly slow (see image).
How do I fix this?

Another problem I'm having is that build&run always yields the same rand(), of which I'm unsure what program to blame.


raynebc:
Running a program in a debugger introduces a fair amount of overhead and delay.  As for your issue with rand(), it's because you're not seeding it with a unique value (ie. the system time is a very commonly used value because it will generally be different from one use of a program to the next in any normal circumstances).  By design, a pseudo-random number algorithm must produce the same sequence of numbers any time it is used with the same initial value (seed).

oBFusCATed:

--- Quote from: raynebc on June 28, 2016, 07:21:17 pm ---Running a program in a debugger introduces a fair amount of overhead and delay.

--- End quote ---
He is not running his program in debug, but this time includes the overhead of starting the executable. Probably he has a A/V software that slows things down.

Navigation

[0] Message Index

Go to full version