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.
763
questions with no upvoted or accepted answers
27
votes
0answers
605 views
Definitional Returns. Solved. Mostly
I have made the bold claim that a longstanding problem in Rebol is "now solved"...that of "definitional returns".
But of course, such claims need some peer review, and there's always some new trick ...
19
votes
0answers
305 views
Multiplying big numbers using Karatsuba's method
The Karatsuba algorithm, first published in 1962, aims to speed up the multiplication of big numbers by reducing the number of 'single-digit-multiplications' involved.
Because of its complexity (...
8
votes
0answers
151 views
Neural Network with Template Metaprogramming
I was implementing a simple neural network, and I noticed that, if I ever wanted to change the layers' activation functions, i would have had to completely rewrite some parts of the code, so I tried ...
8
votes
0answers
143 views
Modeling tabular structure in MSSQL to store data like Excel sheet applying Column inheritance
I've created this database structure to store tabular information (it's a simplification of my real structure but enough to show the point). In it I have Sheets and ...
8
votes
0answers
412 views
Red-black tree appears to be slower than std::multimap
I've written a red-black tree in C as an exercise. The tree works and it is not bad, but it is about 10% slower than std::multimap from libstdc++ which I'm ...
8
votes
1answer
756 views
Function that recursively downloads entire directory is slow
I created this function to recursively copy an entire directory from an FTP server. It works just fine except that it is about 4 times slower than using FileZilla to do the same operation. It takes ...
7
votes
0answers
116 views
Speeding up Python program that converts DOCX to PDF in Windows
This is meant to be a performance-centric question as this type of conversion is obviously very common. I'm wondering about the possibilities for making this process faster.
I have a program that ...
7
votes
0answers
81 views
Frequency analysis for simultaneous dice rolls
My professor told me to optimize my perl code, but he wouldn't tell me what exactly - just make it simpler.
I changed some little things but nothing major. Am I missing something?
The task was:
...
7
votes
0answers
385 views
Unity3D shader for rendering 2D sprites with a pseudo-glitch effect
I'm making a puzzle game in Unity with sprite-based graphics. When the game is paused, I want to hide most game elements, because I don't want the player to be able to pause and leisurely think about ...
7
votes
0answers
967 views
Read quantization tables from JPEG files
I'm developing an application that will hide information inside the quantization tables of JPEG files. It's called DQTsteg, if you want to know more about what I'm attempting to do.
Right now I'm ...
7
votes
0answers
102 views
Stable variation of built-in sort
Ruby's built-in sorts are unstable. The stable_sort gem monkey-patches Ruby's built-in library to have stable sorts which include nearly all the functionality of the built-in sorts, but with the ...
6
votes
0answers
145 views
Optimizing bit-matching performance using AVX compiler intrinsic
We are working on a complicated math problem, very detailed question with description of the problem is here: C++ multi-threaded determination of curling numbers in vectors.
That code is now converted ...
6
votes
0answers
132 views
Generate unique random strings considering collisions
I'm coding a random strings generator. It's working, but I'm not sure if this is efficient.
...
6
votes
1answer
179 views
Way to delegate command to methods in different files
What I want to do is for an example command have it defined in its own file - e.g. command.js - and the same for the other methods. I want to make a separate file for every module - for example "...
6
votes
0answers
138 views
SortedList performance
I've found my app, which uses the SortedList, has a poor performance.
So I decided to try to improve the performance of my app.
I created the ...
6
votes
0answers
83 views
C# Generic high performance vectorized math operations
I'm writing a library which simplifies the usage of intrinsics in C#.
It's a generic library which supports all numeric types.
The goal of this library is to perform these operations at the highest ...
6
votes
0answers
72 views
Code optimisation: Converting dataframe to numpy's ndarray
I am working with a dataframe of over 21M rows.
...
6
votes
0answers
145 views
Chart Based Animations In Excel VBA
I've been working on re-writing comfortablydrei's answer to this PPCG Question regarding creating a illusion animation in pure Excel VBA. So far, I've been able to rewrite the code to function in VBA, ...
6
votes
0answers
191 views
How to make my groupby and transpose operations efficient?
I have a DataFrame of size 3,745,802 rows and 30 columns. I would like to perform certain groupby and ...
6
votes
0answers
119 views
Julia set in Julia (and other fractals)
I've made the following to draw a series of zooming in images of a fractal.
...
6
votes
0answers
115 views
How to speed up simple linear algebra optimization probelm in Julia?
I implemented the LSDD changepoint detection method decribed in [1] in Julia, to see if I could make it faster than the existing python implementation [2], which is based on a grid search that looks ...
6
votes
0answers
134 views
Generating integer partitions
I've tried to implement integer partition algorithm as described in blogpost below (author implemented it in Python):
Generating integer partitions
I'm still trying to learn best practices in ...
6
votes
0answers
146 views
Reading sparse matrix from binary file
I have binary files containing sparse matrices. Their format is:
number of rows int
length of a row int
column index int
value float
Reading ...
6
votes
0answers
631 views
Asyncio HTTP Request Queue
I wrote a simple sitemap.xml checker using asyncio and aiohttp. I followed the documentation demonstrating the producer/consumer pattern. However, I noticed that as the URLs scale larger, it seems to ...
6
votes
0answers
884 views
Codewars: N-dimensional Von Neumann Neighborhood in a matrix
Task:
For creating this challenge on Codewars I need a very performant
function that calculates Von Neumann Neighborhood in a N-dimensional
array. This function will be called about 2000 times
The ...
6
votes
0answers
75 views
Perl gradient noise generator
I'm working on 2-D top-down graphics engine, and need a way to simulate clouds. My idea was that I could create a layer comprised of a matrix of rectangles whose alpha value would be picked from a ...
6
votes
0answers
105 views
Android component animatable on its height
I'd like to have a code review for a component which is supposed to be animatable on its height. It's supposed to be a transitioning element.
I find it quite laggy on my phone.
...
6
votes
0answers
2k views
Calculating T-Test within Large Pandas Dataframes
The below code runs a t-statistic within a large dataframe (rnadf) based on masked values from another dataframe (cnvdf_maked). ...
6
votes
0answers
672 views
Pseudo-parallel depth-first search
I'm writing a small program that generates a file containing an adjancency matrix, it then reads from that file, constructs a graph and does something like a parallel depth-first search (dfs) on it.
...
6
votes
0answers
521 views
Gauss-Seidel+SOR
I am learning OpenMP+MPI hybrid programming. As an example I have chosen Gauss-Seidel+SOR. My implementation uses MPI_THREAD_FUNNELED style hybrid programming, ...
6
votes
0answers
758 views
Parsing Lua 5.2 strings with patterns
I wrote some code to parse Lua 5.2 strings in Lua 5.1, using patterns. It works perfectly as far as I tested.
...
6
votes
0answers
413 views
Fowler–Noll–Vo hash function in Lua
I recently coded this FNV-1a hash function in Lua. Are there any apparent performance improvements that could be implemented?
...
6
votes
0answers
402 views
Translating CFRM algorithm from Java to Clojure and improving performance
Counterfactual Regret Minimization is an algorithm that can be used to find the Nash Equilibrium for games of incomplete information. I have tried to adapt the exercise from here to Clojure. You can ...
6
votes
0answers
416 views
Implementing recursive filters with Haskell/Repa
I recently learned Haskell, and I am trying to apply it to the code I use in order to get a feeling for the language.
I really like the Repa library since I manipulate a lot of multi-dimensional data....
5
votes
0answers
56 views
Neural Network Written in Python is Extremely Slow
I coded a basic feedforward neural network with all pure python with the exception of numpy in order to better understand how neural networks work. It works, but the only problem is it is extremely ...
5
votes
2answers
121 views
Fastest (in clock cycles) 16-bit x 16-bit unsigned integer division algorithm for ATMEGA1284?
I am trying to create an optimized 16-bit division algorithm for the AVR ATMEGA1284. The goal is to reduce the number of clock cycles as much as possible.
AVR INSTRUCTION SET MANUAL:
https://ww1....
5
votes
0answers
52 views
Word finder using pygame
I made a word searching app that allows the user to inout words into a text box,
and parts of the word grid will be highlighted to show the location of the words.
The letters of the grid can be edited ...
5
votes
2answers
63 views
Get exactly `n` unique randomly sampled rows per category in a Dataframe
I want to get exactly n unique randomly sampled rows per category in a Dataframe. This proved to be involve more steps than the description would lead you to ...
5
votes
0answers
143 views
Extract data from API using VBA & XML (Performance)
EDIT: Added a block with the raw code at the bottom (suggested by a friendly user)
First post here. I sincerely hope that I am doing everything by the book. Also, I want to thank you in advance for ...
5
votes
0answers
66 views
Interacting with PostgreSQL attachment and the file system
I have just migrated from Python 2 to Python 3. I have written the following script to fetch all records of a table, ir_attachment, from PostgreSQL. After fetching all the records I check following ...
5
votes
0answers
56 views
Tensorflow loop to analyze gradients derived from MRI and PET images
The code shown below takes the partial derivative of each pixel of the output fused image of a neural network with respect to input image of the neural network using tensorflow's ...
5
votes
1answer
65 views
Evaluator for adding and subtracting algebraic expressions
I wrote a little program that adds and subtracts some algebraic expressions.
In my code (2 x 3) represents \$2x^3\$.
The purpose of this post is to get some ...
5
votes
0answers
213 views
Speeding up the implementation of Stochastic Gradient Ascent in Python
I am implementing a time-dependent Recommender System which applies BPR (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to learn the parameters of the model. Such that, one ...
5
votes
0answers
186 views
WebPage LogReader class - Parallel DNS w/timeout for computer IP's and domains from log scrape
This is a namespace to read a bunch of events from a log file and display them in a table on a webpage, some additional data (computer domain and IP address) is also pulled in from DNS. I am mostly ...
5
votes
0answers
59 views
Building a form for rebooting many network devices
I have several IP based devices that, due to building maintenance, occasionally lose their communication with the other devices. Normally you'd have to find the device IP, go to its control page and ...
5
votes
0answers
65 views
Simulation of a mechanical arm
The code that I am doing is to simulate a scenario where a mechanical arm search pieces closer and these pieces selected the mechanical arm leaves in a position defined closer.
...
5
votes
0answers
142 views
Simple HTTP router package
I have created a router/micro-framework. I have split my code into multiple files by responsibility. All files are in the same directory. Would you recommend any way of improving it ? The most ...
5
votes
0answers
763 views
Implementation of DBSCAN in C++
I've recently just finished my implementation of a DBSCAN in C++ for a machine learning framework. I've tried to follow the pseudocode implementation on Wikipedia as best I could. I also found some ...
5
votes
0answers
159 views
Assembling and traversing a graph, given a list of items and parent pointers
I've written a function which takes input such as this:
...