Questions tagged [timing]

timing is a numerical measurement of the how long it takes to execute an instruction or series of instructions

Timing is a numerical measurement of the how long it takes to execute an instruction or series of instructions. See also .

To get a better understanding of performance of a given code, it should be measured at several problem sizes and empirical orders of growth calculated.

1396 questions
-2
votes
2 answers

How to run javascript functions located in one function sequentially?

So I almost got this the way I want. I have .animate( some stuff) in the dealone() dealonedealer() functions. However, all the animations are happening at the same time since the function dealCards() doesn't care about waiting till one function is…
CRABOLO
  • 8,605
  • 39
  • 41
  • 68
-2
votes
3 answers

Calculating exact runtime, not actual runtime

Is is possible to create a program that, say with byte code, runs your program as normal, keeping a tally of the total run-time by using defined run-times of each instruction as you go? Then, once your program finished, you'd have an exact, system…
Xilo27
  • 15
  • 4
-3
votes
1 answer

Timings of functions inside python script

I've got a script with several complex functions, which looks something like this import time def function1(a,b,c): print(a,b,c) def function2(d,e,f): print(d,e,f) ... ... def function7(g,h,i): print(g,h,i) I am trying to record the…
star_it8293
  • 399
  • 3
  • 12
-3
votes
2 answers

How is the running time calculated for nested "for" loops?

Recently started with this so need your help, Lets say you have nested for loops as shown below, both ranging from 1 to n, how does one calculate the running time for the same in terms of Big O, Theta, Omega? for(i=1; i
Grim0419
  • 19
  • 7
-3
votes
1 answer

cmd displaying output only after program has finished

I have a problem with my python program, it is supposed to print each character individually with a delay in between. Here is my code: import time import os txt=open("text",'r').read() delay=0.25 bg,fg=0,2 os.system("color "+str(bg)+str(fg)) for i…
jackedak
  • 1
  • 4
-3
votes
1 answer

Chrome stalled about 1 second for initial loading of the site, but zero later on freshring

I have running a site serve both via https and http. The issue only happen when access via https, steps are open a chrome, first time to load the only single site in HTTPS, chrome stall this inital connection about 1second. however any immediate…
coder_ll
  • 29
  • 2
-3
votes
1 answer

making c# accurtate as posible (maybe with hacs)?

From what I know it is rather known that c# can not be accurate when timing is critical. I certainly can understand that but was hoping there were known game hacks to help my issue. tech: I'm using an API for USB that sends data over a control…
user2144480
  • 1,083
  • 7
  • 11
-3
votes
1 answer

How to time how long it takes to insert and sort separatley in a TreeMap

I would like to time how long the program takes to insert in the tree to measure the efficiency of a TreeMap's inserting. I also want to measure how long it takes to sort separately. I am doing this for a report I am writing where I am comparing the…
Simon Fraser
  • 15
  • 1
  • 3
-3
votes
1 answer

timing experiment on bst in haskell

Hi i am trying to learn haskell and compare its performance to other languages when i run the following code.. module BST ( Tree, singletonTree, insert, member ) where import System.IO import System.IO.Error hiding (try) import…
burblebee
  • 1
  • 2
-3
votes
2 answers

Quicksort unsorted list running faster than sorted list

I'm getting weird timing results for quicksort with a first element pivot. My code runs quicksort first with an unsorted, non-randomized list of integers. It then sorts the previous sorted list. With my chosen pivot, I expected quicksort to run…
user1390616
  • 171
  • 1
  • 5
-3
votes
2 answers

Html5, JavaScript, Canvas Animations?

I've a watch "second hand" image need to move it every second. if I use the canvas I'll delete the canvas each second so, it'll be ugly to load the watch photo and the "second hand" photo. I need help.
SAIDI Belkacem
  • 338
  • 4
  • 13
-4
votes
1 answer

How do I add setInterval and setTimeout to a loop?

I am trying to add a delay to a loop where the prompt asks the user a question, and repeatedly asks the same question, until the correct answer, "yes" is entered. I then would like the loop to repeat after about a minute or so. I tried to look this…
-4
votes
2 answers

JQuery timing events not working

I am having issues with my timing events in my simon memory game that I have created. I've tried using setTimeout but I don't know which events to time and how much time to set so that theyre distinguishable. $('#play').click(function(){ …
furball514
  • 273
  • 2
  • 4
  • 15
-5
votes
2 answers

Why am I getting a / by zero error?

I'm trying to make a basic timing loop, but I keep getting java.lang.ArithmaticException / by zero error at Timer.advanceTime(Timer.java:24) at Game.run(Game.java:79) at java.lang.Thread.run(Thread.java:722) here is my code: public class Timer…
-6
votes
1 answer

Python can't implement timeit module

This is a basic exercise. I just don't know hot to implement the timeit module correctly. I keep recieving syntax errors import timeit import random def bubblesort(LAux): for i in range(len(LAux)): exchange = False for j in…
1 2 3
92
93