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
-1
votes
1 answer

How to set Maximum method execution time

I've a method that contains a process that must be stopped in a deadline( ex: 3 seconds) whether it has finished or not, and I don't want to wait if it has finished executing before reaching that dead line. using Process.WaitForExit(3000) makes the…
user3379482
  • 557
  • 1
  • 10
  • 21
-1
votes
1 answer

Unable to understand execution time in an algorithm

I have difficulty determining the execution time of each step in an algorithm. I just can't understand the logic. We all know prior to determining the Big O or Theta in an algorithm, we have to calculate the execution time of each step, then we…
napi15
  • 2,354
  • 2
  • 31
  • 55
-1
votes
2 answers

Better way to initialize a "static const"-type variable member of a class in the main

I have a class that needs a static const variable member. The value for that class will be known at runtime by a user input. I have read a lot of post but so far none of the solution works. I am aware that this post: Can I initialize a static const…
Eric
  • 19
  • 4
-1
votes
2 answers

Can I use HipHop Virtual Machine (HHVM) for my social website which is developed using PHPFox to increase the execution speed?

I've an already developed social website like Facebook. This website has been developed using PHPFox v3.0.7 (which is a social networking platform created in PHP). The website functions are working well, no issues with it. The main, major and…
PHPLover
  • 1
  • 51
  • 158
  • 311
-1
votes
2 answers

Get arount execution time limit in php

I've got some function that takes very long time to execute (downloading some external images in my case) and I want to avoid execution time exceeded error. Is there any way to avoid this (for example by dividing downloading of single images into…
Adam Pietrasiak
  • 12,773
  • 9
  • 78
  • 91
-1
votes
2 answers

How to deal with big data in php?

I have a big combination of data when i have generate a excel file using php excel the page going to be hang and excel file not generating. what i will do? i have increased memory time, execution time but still same issue i have also tried buffering…
-1
votes
1 answer

Is it possible to obtain the end date of execution of a file in C++?

how can we get the end date of execution of the file. Actually,I have created a file who write in a file. I would like to write in this file, the end date of execution, that's is possible ? My file : #include #include #include…
shanks
  • 9
  • 1
  • 6
-1
votes
2 answers

Different running times with Python

I'm writing a very simple program to calculate the factorial of a number. Here it is: import time def factorial1(n): fattoriale = 1 while (n > 0): fattoriale = fattoriale * n n = n - 1 return fattoriale start_time =…
Gianx
  • 233
  • 3
  • 11
-1
votes
1 answer

PHP stop processing 'on button or time 'and output "so far collected array"

I have a heavy processing script which can be started from a user via frontend in our intranet. Imagine something like this: $html = file_get_contents($url); $pattern =…
Email
  • 2,395
  • 3
  • 35
  • 63
-1
votes
4 answers

Threads: How to calculate precisely the execution time of an algorithm (duration of function) in C or C++?

There is easy way to calc duration of any function which described here: How to Calculate Execution Time of a Code Snippet in C++ start_timestamp = get_current_uptime(); // measured algorithm duration_of_code = get_current_uptime() -…
Maxim Kholyavkin
  • 4,463
  • 2
  • 37
  • 82
-1
votes
2 answers

MySQL/JAVA Inserting Speed

So I am developing in Net Beans a MySQL/Java program for class that helps us understand execution time and such. So I created the java program so that a user can enter x amount of Tuples into each of the 6 tables. And so we have to enter data up…
Brandon N.
  • 23
  • 3
-2
votes
1 answer

MySQL Basics: query execution and case sensitive

I am a newbie to mysql and having some questions on it, Is there any way to find the execution time of any SQL statement in 'ms' approximation using command prompt (any setting to be done pls specify). how to make your mysql to allow the case…
LOURDHU KUMAR
  • 91
  • 1
  • 7
-2
votes
1 answer

Is there a performance difference between omitting and including a return statement within a python function?

Assuming we have a function that updates a bunch of internal values within a class like so: class MyClass: def __init__(): self.counter = 0 self.condition_1 = True self.condition_2 = False def update(): if…
Random
  • 13
  • 3
-2
votes
1 answer

Incorrect measurement of the code execution time inside OpenMP thread

So I need to measure execution time of some code inside for loop. Originally, I needed to measure several different activities, so I wrote a timer class to help me with that. After that I tried to speed things up by paralleling the for loop using…
Aisec Nory
  • 385
  • 1
  • 8
-2
votes
1 answer

Why is execution times measured differently here using Java?

What is the difference between these 2? They both give me the execution-times with slighlty different values and I can tell they are written differently. But since the outcome is nearly identical, what does code 2 do that code 1 does not? What…
Dyson
  • 23
  • 6