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.
8,829 questions
-3
votes
0
answers
41
views
Websocket integration for High frequency trading [closed]
I’m currently building a trading platform that requires streaming real-time price updates to the UI. I’ve implemented a WebSocket gateway and added handling for common issues such as:
Ghost/...
0
votes
0
answers
61
views
Сreating a digital twin of the enterprise
I am creating a program to create digital twins of enterprises. I am using the Simpy framework for this purpose.
I'm creating a universal system that can model almost any enterprise, but I have a ...
4
votes
3
answers
84
views
Optimizing DataFrame iteration when generating large hierarchical text files
I have a custom object which stores dataframes in memory given a certain hierarchy, and I want to store this data in a file while maintaining the hierarchy. This hierarchy involved parents, children, ...
2
votes
0
answers
80
views
Native Messaging performance test
I put together this Native Messaging performance test to determine based on evidence which programming language, JavaScript engine or runtime, and WebAssembly compiled code is fastest to round trip 1 ...
1
vote
1
answer
111
views
Jump point search in Java for faster pathfinding in grid mazes
(Refer to the entire repository in GitHub.)
How it looks like
Intro
This time, I present my take on Jump point search that I translated from Javascript (PathFinding.js/src/finders/JumpPointFinderBase....
8
votes
1
answer
719
views
Reed-Solomon LFSR encoder
I'm interested if the code below could be further enhanced for out-of-order execution.
Function inputs:
rcx = pointer to a 2 by 64 byte table to multiply 64 bytes ...
5
votes
2
answers
365
views
BRESort - Bitwise Relationship Extraction - Intelligent Adaptive Sorting Engine for 32/64-bit & Floating-Point Data
I want to begin by sincerely thanking the community for the invaluable feedback on my previous BRESort byte-sorting research. Your insights about enums, named constants, loop optimizations, and test ...
4
votes
1
answer
92
views
Dijkstra's algorithm for non-uniform undirected hypergraphs: Take II - bidirectional Dijkstra's algorithm with excellent performance
Intro
(See the full repository here.)
A non-uniform undirected hypergraph is a generalization of an undirected graph. It is defined as \$H = (X, E)\$, where \$X\$ is the set of vertices and \$E \...
7
votes
4
answers
686
views
My BRESort adaptive sorting engine in C
I've created BRESort - an adaptive sorting engine that dynamically selects
optimal algorithms based on data patterns. It achieves 3.6-4.2x speedup over stdlib qsort ...
10
votes
2
answers
414
views
Image Stitching using SIFT Keypoint Descriptor in C++
This is a follow-up question for SIFT Keypoint Detection for Image in C++. With the detected SIFT keypoints of images, image stitching is possible to perform. In this post, the first step is to ...
9
votes
4
answers
809
views
Find the smallest semiprime satisfying a bunch of conditions
The purpose of this code is to find the smallest semiprime \$s = a b\$ satisfying a bunch of conditions stated in the Math.SE question What is the smallest "prime" semiprime?. The conditions ...
0
votes
0
answers
18
views
LazyColumn compared to RecyclerView in Jetpack Compose
I’m building a simple Food Manager screen using Jetpack Compose.
The UI allows users to:
Select a food category (Fruit, Vegetable, Snack, Drink).
Select an item from that category.
Add the ...
1
vote
0
answers
140
views
Collection Utilities for VBA
Background
I am building a complex, standalone class. It has a property called .Mapping, which should behave like a Dictionary.
...
6
votes
1
answer
541
views
Creating a fast connect 4 ai solver in JavaScript
I’ve implemented a Connect 4 AI in JavaScript using a Negamax search. My goal is to solve the game completely from the starting position (depth 42). I’m trying to make it as fast as possible and would ...
7
votes
1
answer
882
views
Move generation in my C++ chess engine [closed]
I am building a chess engine in C++ and currently working on the move generation. To measure performance I use perft, but my main goal is to make the move generator itself faster.
I already use ...
2
votes
0
answers
92
views
Generate Julia Fractal Image in C++
This is a follow-up question for Generate Mandelbrot Fractal Image in C++ and An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. Besides Mandelbrot Fractal ...
3
votes
1
answer
140
views
Calculate optimal game upgrades, v3
This is the third iteration of the code from Calculate optimal game upgrades, v2 and Calculate optimal game upgrades. I'm looking for suggestions to further optimize this code. A brief summary of the ...
6
votes
3
answers
682
views
Interactive simple calculator as a first project. As of now it handles arithmetic, linear and quadratic calculations
This is my very first personal project. I'd like to know what I can improve in this code, with reference to optimization and efficiency.
Here's the code:
...
12
votes
2
answers
1k
views
Generate Mandelbrot Fractal Image in C++
This is a follow-up question for An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying to implement Mandelbrot Fractal image generator in C++ in this ...
4
votes
3
answers
452
views
FOLLOW-UP to the Strength of a Pyramid Top post with a revised code example
As a follow-up to my previous question, I've decided to post a follow-up question with a revised code that accommodates most of the inputs from the previous question's comments, namely:
Used ...
5
votes
3
answers
570
views
Strength of a Pyramid Top
I need to solve the following competitive programming problem from coderun.ru:
Strength of a Pyramid Top
The pyramid consists of n horizontal layers of blocks: the first layer contains n blocks, the ...
7
votes
4
answers
1k
views
Project Euler #909: L-Expressions I
I am trying to solve the 909th challenge of Project Euler. It is basically about replacing specific patterns in a string until no pattern is found. A given string like ...
3
votes
0
answers
75
views
lanczos_resample Template Function Implementation for Image in C++
This is a follow-up question for Two dimensional bicubic interpolation implementation in C++. I am trying to implement Lanczos resampling for 2D image in this post.
The experimental implementation
<...
4
votes
3
answers
709
views
Multithreaded array summation in Java - best practice, structure, acceptable use of Constant classes. There is no concurrency?
The task is educational. The basic functionality is working. Here are some questions for my code. Please give me feedback.
Main:
Architecture & Design: Is the decomposition appropriate? Should ...
1
vote
0
answers
67
views
CUDA Sphere Tesselation With Support For LOD
I was working on my version of "Universe Sandbox" and first thought comes to your mind is "where the hell are my planets?" so I thought loading models sucks and made this thing, It'...
2
votes
1
answer
337
views
General Two-dimensional Elliptical Gaussian Image Filter in C++
This is a follow-up question for Two dimensional gaussian image generator in C++, Three dimensional gaussian image generator in C++, General Two-dimensional Elliptical Gaussian Image Generator in C++ ...
7
votes
1
answer
240
views
Optimizing a Rust permutation chooser for the most subsequences
I had semi-recently asked a question (well a couple closely related questions) on math.stackexchange. The simplest question is phrased as follows: You are allowed to make 3 permutations of length n. ...
7
votes
1
answer
365
views
General Two-dimensional Elliptical Gaussian Image Generator in C++
This is a follow-up question for Two dimensional gaussian image generator in C++ and Three dimensional gaussian image generator in C++. According to the statement in https://fabiandablander.com/...
3
votes
2
answers
252
views
Third way to place queens and rooks with the higher score (extension of the queen problem)
Here is a third implementation, the second is in my question Place queens and rooks with the higher score (extension of the queen problem) and an initial one is in my answer for the question N queen ...
5
votes
4
answers
303
views
Swift for CLI tools (traversing directories, reading text files)
To compare ergonomics and performance of some languages for my hobby projects, I have written a simple lines of code counter in Swift, Go, Rust and Python. It scans a given directory tree for source ...
2
votes
1
answer
160
views
Blazor web app using .NET 9: SQLDbSettings Code Optimization
I am developing a Blazor web app using C# .NET 9 in Visual Studio Code. I am using SQL Server 2017. This project is intended for internal company use.
In the ...
4
votes
1
answer
196
views
Place queens and rooks with the higher score (extension of the queen problem)
This is a continuation of the question N queen problem-like (+rooks and a different goal) written by someone else, where I answered.
EDIT I continued to work on the subject and a third implementation ...
2
votes
1
answer
112
views
Locate \r\n\r\n in a HTTP POST request (Uint8Array)
The requirement is to split the headers from the request body, most efficiently.
Possible approaches I have employed and/or considered
Decode to text, match ...
7
votes
3
answers
582
views
Team picker command line application
I've made a program for randomly splitting game participants into different teams. The code works and solves the problem. I'm interested in advice on what you'd do differently or better.
...
3
votes
1
answer
189
views
Synchronize clock tick for timed action
The code shown below goes back to the tutorial How to Use a Timer in Tkinter.
I first simplified the tkinter import by restriction to Python 3.
Then I found a ...
6
votes
1
answer
342
views
Arbitrary-layout Floating-point Number conversion library
This is a library I've been writing, for now named ALFPN, for converting between native floats and layouts that are not native - half, various 8-bit formats etc. ...
2
votes
1
answer
217
views
Attempt at a Different Variation of the strstr(...) Function
I decided to work on an idea I had to 'optimize' the classic C function strstr.
Most of the implementations I had seen that did not make use of advanced ...
6
votes
2
answers
732
views
Weather Observation Station 8 query
Here's my (correct) solution to a HackerRank question:
Weather Observation Station 8
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last ...
6
votes
1
answer
593
views
Substring = Permutation of a given pattern
I am working on a problem on LeetCode.
Considering only lowercase characters from 'a' to 'z', I have written some Java code to check if a permutation of a given pattern is a substring of a given ...
13
votes
5
answers
3k
views
Infinite precision integer in C++20
This is my infinite precision integer implemented in C++20. It supports negative numbers. I have implemented addition, subtraction, multiplication and binary integer division, which returns quotient ...
3
votes
1
answer
86
views
More shortest unrestricted paths to touch every square in an n by n grid
This is a part two.
The problem originates from here,
it is solved for \$n<11\$. A GitHub repository for this code, printing paths, and a collection of all proven best paths, it is open to ...
9
votes
3
answers
2k
views
Solver for Wordle puzzle
After a success with the Jumble puzzle solver, I am doing a Wordle puzzle solver. I know many other Wordle solvers have been posted, yet this is my original version, which emphasizes list ...
5
votes
3
answers
254
views
Sieve of Eratosthenes with Wheel Factorization in C++ version 2
I have implemented Sieve of Eratosthenes with Wheel Factorization in C++ again, this time using a bigger wheel and much more complicated C++ syntax, to familiarize myself with C++ and see how fast I ...
5
votes
3
answers
1k
views
Slow SQL query with nested subquery
I have written the below query in order to identify how many events (occur over a week) in each hour.
...
3
votes
1
answer
261
views
Solution to the N Queens Puzzle in the PicoBlaze assembly language
You can see it live here:
...
4
votes
3
answers
570
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 ...
15
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 ...
1
vote
0
answers
42
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 ...
5
votes
1
answer
155
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 ...