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

Execution Time: Iterativ vs Instance

I just stumbled across a strange thing while coding in Java: I read a file into a bytearray (byte[] file_bytes) and what I want is a hexdump output (like the utilities hexdump or xxd in Linux). Basically this works (see the for-loop-code that is not…
user3469811
  • 676
  • 1
  • 5
  • 17
-1
votes
2 answers

What's the performance difference between "skip if condition" and "directly return"?

Is there any performance difference between the following 2 functions: function a() { var a = false; if(a == true) { ... Many lines, e.g. 1 million lines ... } } function b() { var a = false; if (a != true) { …
skyline
  • 443
  • 9
  • 31
-1
votes
2 answers

A way/ tool to make an estimation of execution time for an APP/ task

I'am trying to run real-life experiment for an application in Raspberry Pi, and I need to estimate or predicate the execution time for the application. in other words, before execution/ run the task i need to know how long (roughly) this task/app…
Ali Jaddoa
  • 11
  • 1
  • 4
-1
votes
1 answer

Getting Different Execution Time in R using Sys.time

I am measuring the execution time of a program written in R by writing Sys.time() at starting and end of the code and calculating the difference. The result I am getting is changing at different instances of time. Eg: adjacent1. matrix 0 1 1 1 1…
Anuja
  • 27
  • 3
-1
votes
2 answers

Struct null byte vs \x00

What is the difference between writing a null byte with: print("\x00") And writing one with: print(struct.pack("B", 0)) I've taken the liberty of timing both of their execution times with the following: def struct_exec_time(): start_time =…
CertifcateJunky
  • 161
  • 1
  • 11
-1
votes
2 answers

How to obtain expected execution time and worst case for algorithms with infinite loop?

I have a one doubt about expected execution time and worst case executio time of algorithms, I was think a simple algorithm but this contain a loop infinite and I don't know about to explain that expected execution time?. I could always determine…
-1
votes
1 answer

Execution time issue after change the MySQL DB to MariaDB

I change the MySQL 5.6 to MariaDB 10.1, the total number of record above 5 Million. Using PHP script export the data with join query. Now the export take time delay for same PHP code. Before, MYSQL DB : 20 to 30 second After, MariaDB DB : 50 to 60…
Raj Mohan
  • 543
  • 9
  • 25
-1
votes
1 answer

Difference on Execution Time

I am trying to measure the execution time of a dot product, but I am finding difference depending on the variable used for storing the final result, i.e., when using an integer the result is 0ms but when using an element of array the time is much…
jvknc
  • 3
  • 2
-1
votes
1 answer

Reduce looping execution time

i got 35 second to execution this code. how to reduce the execution time? what should i change in this source code. $file_handle = fopen("WMLG2_2017_07_11.log", "r"); while (!feof($file_handle)) { $line = fgets($file_handle); if…
nawfal Af
  • 11
  • 9
-1
votes
1 answer

Quick way to execute parsing dates and put in a TreeMap

I have to read a massive csv with about 40.000 entries with dates and values. I did that : TreeMap fi = new TreeMap(); CSVReader reader = new CSVReader(new FileReader(path),';'); String []…
Aikas
  • 67
  • 2
  • 7
-1
votes
1 answer

reduce execution time in loop

I have a code like this: RandomAccessFile raf = new RandomAccessFile(new File("C:\\Users\\AhmadMaleki\\IdeaProjects\\Hello world\\src\\kish\\file1"), "r"); for (int i = 1 ; i < 1025 ; i++) { for (int j = 0; j < raf.length() -…
Ahmadit
  • 13
  • 1
  • 6
-1
votes
1 answer

Faster "if" statements

I have a quick question about what would be faster to compute in python. It's a large simulation, so any little thing to save time helps. As I understand it, when python evaluates an "if" statement with an "or" in it, it doesn't bother with the…
-1
votes
1 answer

How to get execution time in milliseconds format in Weka

I am using WEKA jvm and trying to run generalized sequential pattern algorithm on my data. I want to get execution time in millisecond. How can I do it ?
clouddy
  • 891
  • 2
  • 8
  • 10
-1
votes
1 answer

How to capture bound parameters and timing in Oracle

Simple problem: I got a query (complex) which seems to run slow for specific parameters. I want to find out what these parameters are. Is there any tracing I can enable in Oracle (12) which would allow me that. I am looking for some kind of list…
Michal123456
  • 81
  • 1
  • 1
  • 6
-1
votes
1 answer

different execution time or the same with different options?

If i compile a C program with different options like '-o, -o2, -o3' Will there be any difference in the execution time or memory utilization?.