Why can a computer take minutes to run a couple lines of code, yet can run complex things like games so quickly?

754 views

Why can a computer take minutes to run a couple lines of code, yet can run complex things like games so quickly?

In: Technology

10 Answers

Anonymous 0 Comments

What do you mean by “a couple lines of code”?

Take this code for example:

while (true):
print(“hi”)

These are just two lines of code, but will run endlessly. So it depends on what the program actually does.

You are viewing 1 out of 10 answers, click here to view all answers.