Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
2 answers
106 views

C# Least resource/processor intensive for accurately blocking thread over short periods of time

I'm developing a console application that periodically executes two threads: one for a tickEvent function and another for updating the console display. Currently, each thread simply blocks on a ...
Isaac Honeyman's user avatar
0 votes
1 answer
23 views

Improving JavaScript Refresh Rate Estimation with `requestAnimationFrame` [duplicate]

I've written a simple JavaScript function to estimate the screen's refresh rate using requestAnimationFrame: let frameCount = 0; let startTime = performance.now(); let refreshRateEstimate = 0; ...
asmtilde's user avatar
0 votes
1 answer
29 views

Dictionaries, new dictionary typing, and their operating speeds

I just discovered Godot introduced Dictionary type-casting in v4.4, and I decided to play around with it a bit. I was curious whether using type-cast dictionaries would be more or less efficient time-...
Frasher Gray's user avatar
4 votes
1 answer
77 views

Why is calling clock_gettime with CLOCK_THREAD_CPUTIME_ID relatively expensive compared to other clock types?

When I run my code to measure how much time a program thread spends in CPU (both user and system) I use the API such as struct timespec start, end; clock_gettime(...
Emanuele's user avatar
  • 1,497
2 votes
0 answers
36 views

Authentication TLV implementation on linuxPTP stack

I was taking a look at the authentication TLV implementation for linuxPTP stack. If I understand correctly, once you configure two nodes and if you provide a pair of keys to the two nodes, ...
romi's user avatar
  • 23
0 votes
2 answers
43 views

How can I extract the data from profvis in R?

I'm using profvis to profile my functions in R, but I want to extract specific timings for subfunctions. For example if I run a = profvis({ dat <- data.frame( x = rnorm(5e4), y = ...
user19904's user avatar
  • 182
0 votes
1 answer
57 views

In bash, how can an explicitly forked process determine that it was explicitly forked (versus, say, run in a subshell)?

Im working on a bash profiling tool called timep that gives per-command runtime profile for bash scripts and functions. It does this using a DEBUG trap to record start time and stop time for each ...
jkool702's user avatar
1 vote
0 answers
94 views

How to waste a few CPU cycles without causing any memory accesses

I'm looking for a low-overhead method for my program to stall a few cycles on an Intel CPU, without causing memory accesses or side effects that could alter the CPU components' data (e.g. no usleep())....
Mani's user avatar
  • 110
1 vote
1 answer
83 views

Why is fifelse faster than checking a subset in data.table?

I'm comparing the speed difference between these two methods of updating a column on a data table (for testing, the flag column is 50% TRUE, 50% FALSE): A[flag==TRUE,b:=b + myfunc(a,b)] A[,b:=b + ...
Sinnombre's user avatar
  • 474
1 vote
2 answers
82 views

Why is there such large variation in computation time for Fibonacci generation between adjacent values of n?

Each method is getting large variations in computation time, even with lots of repeats (to obtain a mean). The effect appears to get worse with larger n. This is my timing code. def timeBlock(func, n,...
Lockyli's user avatar
  • 19
0 votes
1 answer
55 views

JS function works only when hard refreshing page

I'm sure this has something to do with the timing of things loading, but I can't figure it out. I'm using Oracle's Jet charting libraries and trying to convert the y-axis to a percent When I run this ...
theduckspants's user avatar
0 votes
0 answers
40 views

Processing code concatenation faster in Javascript

I thoroughly check my website 100 times in the past few days with google Pagespeed Insights. On the mobile tests, it keeps pointing out that I have long tasks that take roughly 60-70ms to execute. I ...
mike_s's user avatar
  • 27
0 votes
1 answer
73 views

Image animation: moving picturebox in VB.NET

In a project, I am trying to create a slideshow on part of a form, animating a picturebox and sliding it from right to left, and this is working fine as long as I use only one image. If I loop within, ...
Phil91's user avatar
  • 9
0 votes
1 answer
158 views

Why doubling the operations within a loop does not double the CPU time?

I'd like to understand why the cpu time isn't doubled when performing twice as many operations within a loop in Fortran90. I wrote a small code like below, program test integer :: i, n real :: ...
cfd39's user avatar
  • 1
1 vote
2 answers
115 views

Is WaitForSingleObject not platform independent for accurate timing?

I have an old app written in Delphi BDS 2006. The app communicates with an external device via the serial port which requires a quite accureate timing on sending data. The timing must be 2ms, so I use ...
digi's user avatar
  • 41

15 30 50 per page
1
2 3 4 5
95