Skip to main content

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.

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 ...
CodeCrusader's user avatar
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 ...
NeKon's user avatar
  • 407
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 ...
Subject303's user avatar
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), ...
manifold's user avatar
  • 121
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 ...
Charles Henington's user avatar
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 ...
user430243's user avatar
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 ...
NeKon's user avatar
  • 407
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 ...
Sophie Père's user avatar
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 ...
Haowen Shi's user avatar
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 ...
Joe's user avatar
  • 175
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 ...
Petr Hudeček's user avatar
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 ...
NeKon's user avatar
  • 407
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 ...
X-SimE's user avatar
  • 33
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 ...
Droid's user avatar
  • 119
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 ...
Alex Lopez's user avatar

15 30 50 per page
1
2 3 4 5
517