633 questions
0 votes
0 answers
39 views
django: Updating a database based on changes on a object or file?
So I am making a website to dynamicaly calculate cost and profit of some crafts(bps) in a game (Eve btw). As I like to do calculations on my own and store my own data, I need to get most of the needed ...
0 votes
0 answers
45 views
How to design a memory-efficient partitioning algorithm for task execution with shared dependencies?
I’m trying to design a partitioning algorithm to scale task execution in a resource-constrained environment. Here’s the situation: Tasks consume data via a DAL (Data Access Layer), which could be a ...
1 vote
1 answer
51 views
Efficient way to sum the columns of a Toeplitz/Hankel matrix
There are many repeated values in an (N × N) Toeplitz matrix. Example: The same is true for its mirror image, the Hankel matrix. I am trying to find the most efficient way to sum the columns of such ...
1 vote
1 answer
51 views
How to improve performance on multiplying values in two lists, checking for matching indices
I've created two lists, call them "a" and "b". List a has length 24,480 while b has length 20,116. Every element in both a and b is also a list of length 3. To visualize, each ...
0 votes
0 answers
90 views
Most efficient way to use a function repeatedly
The goal is to use a formula, for simplicity given as: def my_formula(x): return x + 5 , in other functions, in a way that doesn't waste computation time by constantly having to reference back to ...
0 votes
1 answer
96 views
How to increase VBA Do While loop efficiency?
I am trying to process a column in an excel sheet that contains around 50k rows. The column has text values that need to be evaluated and in case of a correct match, a part of that string needs to be ...
1 vote
1 answer
750 views
Bad query performance postgres 16
We are trying to make the step from postgres 10 to 16, we already tried a while ago to lower versions 12 or 13, but updates were added in the machine and the poor performance we attribute to those ...
1 vote
1 answer
328 views
Comparing efficiency of two queries
I am learning SQL, and while working through guided examples, I like to attempt writing my own query to answer a question before seeing how the lesson suggests doing it. In this case, I used a ...
0 votes
0 answers
57 views
What would be the most efficient way to store multiple sets of fixed arrays (std::vector)?
As it stands, I have a game I writing, utilizing PCG (Procedural Content Generation). I was wondering if there was a better way to store the vertices of my polygon with certain library restrictions (...
0 votes
2 answers
87 views
Optimize a function that analyses a String
I'm currently programming an MCTS AI for a game and I want to optimize the CPU bottlenecks. One method takes about 20% of all processing and returns to what team a piece/base on a position on a 2D ...
5 votes
1 answer
163 views
R: Efficient Way to partly modify diagonal of matrix
I have a square matrix with dimension ranging from 100x100 to 10,000x10,000. The matrix represents parameter values for a function. I go through a loop where I try various combinations of parameters....
0 votes
1 answer
60 views
Is it efficient to access/update an array using stored in site options using get_option and update_option in a loop?
I have an array stored in the site options in WordPress which will potentially have 3000 email addresses in it. Every night I need to process this list with some checks on those email addresses and I'...
0 votes
3 answers
156 views
How to most efficiently repeat the same merge on different columns in R (preferably data.table)
I have program that needs to repeat a merge which uses the same column from Table A over and over, but changes the column from table B. Doing it with a loop that uses the data.table::merge command ...
-2 votes
1 answer
87 views
Python efficiency - nested loop structure with matrices
I am new to python, but have been coding in MATLAB for years. I've been working to code a specific problem, which requires nested for loops for multiple matrices to solve a series of equations. I knew ...
2 votes
3 answers
99 views
Looking for a more efficient way to implement this R code if possible
I have the following R code that works but it's quite slow. I want to create a new column based on the values of an existing column in a R dataframe. But there's a catch/complication, I need to access ...