Questions tagged [performance]
Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.
7,746 questions
4
votes
4
answers
369
views
Finding Special Parts in a Word
Task description:
Imagine you have a long word made up of small letters like "a", "b", "c", ancd so on. Let’s call this word a puzzle word.
We want to look at all the ...
16
votes
1
answer
2k
views
CUDA Mandelbrot Kernel
I'm looking for feedback and suggestions on improving the performance and quality of my CUDA kernel for rendering the Mandelbrot set. I've implemented a "ping-pong" style coloring and ...
0
votes
0
answers
18
views
Identifies connected elements and faces in FE mesh
So I'm conscious that this is a weak appeal for best practices. I'm building a converter that moves generic FE meshes to an inhouse edge format in Fortran and at some point I made a truly diabolical ...
2
votes
0
answers
71
views
backward induction algorithm computation
Is there a way to significantly speed-up this code?
I'm solving a dynamic programming model using a backward induction algorithm. A crucial step is to calculate the current-period value function (VF), ...
2
votes
3
answers
2k
views
Fibonacci Sequence Generator generates 1 million numbers
A FibonacciSequenceGenerator in C# looking for speed improvements. Currently generates 1 million numbers in 25.6 seconds.
We must use BigInteger because the ...
5
votes
2
answers
173
views
LeetCode Number 416: Partition Equal Subset Sum
Problem: MLE
I am confused as to why the LeetCode judge reports Memory Limit Exceeded when my solution looks close to the editorial solution. I not too familiar with ...
6
votes
1
answer
269
views
Julias Set fractal timelapse
I've implemented a fractal renderer with a physics-based animation system that creates a never-ending "timelapse" effect, here is an example video.
The function uses pseudo-physics to move ...
1
vote
0
answers
84
views
Vectorized approach for generating random numbers with specified count and sum
I'm looking to optimize my code by avoiding the use of a for loop, in order to improve performance when working with large data frames controlled by ...
5
votes
1
answer
357
views
How to implement an AVL tree efficient enough in Haskell?
upd: I am very sorry about my mistake. The old version of data is download from luogu, but the website do NOT allow me to download the data of the worst case. In fact, when facing same amount of ...
2
votes
1
answer
74
views
Efficiently simulating a control sequence
I have a control problem that I am simulating in C. The premise is that I have some continuous-time signal s(t) and I am given some length-150 array ...
0
votes
1
answer
89
views
2D line-of-sight recalculation code causes lag whenever a door is opened [closed]
My 2D video game recalculates into a cache the line-of-sight from every tile to every other tile and whether that line-of-sight provides clear shot, cover, greater cover or is blocked.
Each time a ...
5
votes
0
answers
135
views
FractalRendering on GPU with CUDA
I am doing a fractal renderer using CUDA, SFML, C++, recently optimized it to eat less memory, now I am going to optimize the actual fractals, because for some reason, it is the most holding back ...
3
votes
2
answers
145
views
Numerical integration using Gauss and trapezoidal methods [closed]
I have written a code that performs numerical integrations—one using the Gauss method and the other using the trapezoidal method. For the Gauss method, I have five separate text files containing the ...
1
vote
3
answers
198
views
fibonacci sequence generator
I have a piece of code that attempts to reduce the work and span in making a Fibonacci sequence. My approach is to parallelize the code as much as possible, along with doing matrix multiplication and ...
7
votes
1
answer
206
views
Robin Hood Hash Table
The following code comes from an intrusive container library I am working on in C23. So far, it works correctly due to extensive testing and sample programs I have written with it. I have implemented ...