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
0
votes
2 answers

why two almost same implementation is having a big execution time difference?

I am trying to solve the Knight Tour problem using bactracking as given on this site. Implementation given on the site takes about 0.49 seconds on ideone. int solveKTUtil(int x, int y, int movei, int sol[N][N], int xMove[N], int…
Eight
  • 4,194
  • 5
  • 30
  • 51
0
votes
1 answer

Parallelization efficiency of openMP

I have a C++ code containig many for-loops parallelized with openMP on a 8-thread computer. But the speed of execution with single thread is faster than parallel 8 thread. I was told that if the load of the for-loops increases parallelization will…
Shibli
  • 5,879
  • 13
  • 62
  • 126
0
votes
3 answers

max_execution_time Alternative

So here's the lowdown: The client i'm developing for is on HostGator, which has limited their max_execution_time to 30 seconds and it cannot be overridden (I've tried and confirmed it cannot be via their support and wiki) What I'm have the code…
Braunson
  • 717
  • 2
  • 12
  • 36
0
votes
1 answer

PHP Profiler with method execution count, times etc. without extensions

Is there any class or library that I can use for profiling, finding bottlenecks, seeing unnecessary execution times etc in my local php environment using beside the CI's default profiler? I'm going to use it remotely and my host doesn't have any…
Taha Paksu
  • 15,371
  • 2
  • 44
  • 78
0
votes
1 answer

How to calculate time for a cilk_spawn

thanks for looking at the post I am benchmarking some Cilk Plus code and was looking to calculate the time required to complete a "spawn" operation. I am interested in calculating only the time required to do a spawn and not the computational time…
boffin
  • 639
  • 2
  • 13
  • 26
-1
votes
2 answers

Reduce execution time of a code that uses binary search

The problem is to create an array of player ranks based on 2 other arrays: leaderboard and player scores. More explanations of the problem here: https://www.hackerrank.com/challenges/climbing-the-leaderboard/problem. The code below is a spaghetti…
redone_lsf
  • 11
  • 2
-1
votes
1 answer

react-useEffect execution time

i'm woundring if is it OK to write all the logic inside a useEffect react hook or to create a function and call it inside the useEffect. First way useEffect(()=>{ // code logic },[dependency array]) Second way: const toDoFunc = ()=>{ // code…
Abdelbaki
  • 1
  • 3
-1
votes
1 answer

Different execution times between pow and powf of standard math.h library in c programming

I'm currently benchmarking several algorithms in C code. I recognized the following behavior I cannot explain: When comparing the execution times of the pow() and powf() function of the math.h library, executing the powf() function is two times…
Berni
  • 7
  • 2
-1
votes
1 answer

Python : reduce execution time, optimize loops

def SSIM_compute(files,WorkingFolder,DestinationAlikeFolder,DestinationUniqueFolder,results, start_time): NumberAlike=0 loop=1 while True: files=os.listdir(WorkingFolder) if files==[]: …
Jammin
  • 1
  • 1
-1
votes
3 answers

mysql query execution time | reduce query

I have a query which let me to change users order. here is my query: update test set orderID = case orderID when (select orderID from ( select * from test where orderID > ( select orderID from test where id = 'id I want to move up'…
John
  • 7,500
  • 16
  • 62
  • 95
-1
votes
1 answer

can you customise the maximum execution time error message

is it possible to have a customised Maximum execution time so instead of showing PHP Fatal Error – yii\base\ErrorException Maximum execution time of 30 seconds exceeded and then showing all the code on the error page, I'd like it to take you to a…
Helen Postle
  • 45
  • 1
  • 10
-1
votes
1 answer

Calculate execution time of pagination in Cakephp

I am trying to optimize my query for a page with pagination results in Cakephp and therefore I am looking to calculate the exact time with the PHP function microtime(). That way, I will know better how much time it's taking to execute the certain…
Oris Sin
  • 1,023
  • 1
  • 13
  • 33
-1
votes
1 answer

Execution time and number of comparisons done for string matching search

I need to count the number of comparisons done by the following search function.. Also how to calculate the execution time..Any help? I want the count and time to be printed in the output. // C# program for Naive Pattern Searching using System;…
Memo
  • 5
  • 4
-1
votes
1 answer

How to calculate execution time of a python function?

I am calling a function to download a file from sharepoint and upload to sql server database. I am logging the information success and failure in a table. how can i calculate total time that takes during the execution of this…
-1
votes
2 answers

Comparing performance of various pthread constructs

I need to compare the performance of various pthread constructs like mutex, semaphores, read-write locks and also the corresponding serial programs, by designing some experiments. The main problem is deciding how to measure the execution time of the…
him
  • 487
  • 3
  • 12