Questions tagged [execution-time]

Execution time refers to how long it takes a particular program to execute.

Use this tag for questions related to measuring or improving the execution time of a particular piece of code.

724 questions
-5
votes
2 answers

Examples of C programs with long execution time

Please suggest me some examples of C programs that have long execution time, apart from the usual sorting and recursion. I want to analyze the execution times of code and would like to use some programs that have considerable execution time, not…
user1727270
  • 303
  • 1
  • 3
  • 10
-6
votes
2 answers

the number of execution time of 2 code will differ?

I wonder how many times the 2 piece of code will be executed. Both of them are n times or one of them is n+1 ? int sum=0; for (int i = 1; i <= n; i++) sum = sum + i; AND int sum=0; for (int i = 1; i <= n; ++i) sum = sum + i; Is there anyone…
caesar
  • 2,865
  • 11
  • 29
  • 36
-8
votes
1 answer

Which one of the following codes is faster in excecution?

Basically which one of the Codes will return 0, faster ? // if the answer is "the same" because the code is simple than imagine a more complex code variant written in the same way but with more code. Code 1: int a = 0; if(a == 1){ return…
1 2 3
48
49