U
U
Urukhayy2015-03-16 15:55:00
Programming
Urukhayy, 2015-03-16 15:55:00

Is the processor responsible for the speed of processing cycles?

Is the processor responsible for the speed of processing cycles?
If there are 50 thousand iterations in a single-threaded execution of any script, is this normal?
And if you put the whole thing on a machine with a high-frequency processor? And if a multi-core processor? And if the program is executed in one thread, then the number of cores is not important?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tsarevfs, 2015-03-16
@Urukhayy

Is the processor responsible for the speed of processing cycles?
Inside the loop there can be operations whose speed depends on the speed of the memory or even the hard disk, for example if you read from a file there. But the processor is also important.
If there are 50 thousand iterations in a single-threaded execution of any script, is this normal?
If the body of the loop is simple arithmetic, then such a loop will be executed in a fraction of a second.
And if you put the whole thing on a machine with a high-frequency processor?
Depends not only on the frequency of the processor, but most likely will be faster.
And if the program is executed in one thread, then the number of cores is not important?
With a bunch of cores, our program will be less interrupted by other processes, such as the operating system itself. See "preemptive multitasking".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question