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.

Filter by
Sorted by
Tagged with
1
vote
0answers
57 views

Generate many, many folders fast

I've made a program which makes the folders a-z, and in each of those makes the folders a-z, and in each of... you get it. many, many folders. its quite slow at the moment, would there be any way to ...
2
votes
0answers
20 views

I need a better way to add css per each page on wordpress

I just started to use Wordpress to start building a website, but as I need to use the get_header() function to retrieve the ...
-5
votes
0answers
21 views

Pagination by combining two query results [closed]

There are currently two query lists, let's assume one is List queryList1 and List queryList2, where ...
7
votes
5answers
1k views
5
votes
2answers
132 views

Find words in a word grid

I made a program to find words in a word grid. It will find words that are horizontal, vertical, positive sloped and vertical sloped, all in both forwards and backwards. Here is my code: ...
0
votes
0answers
26 views

Converting binary data to RGB triples [closed]

I would like to decrease the time complexity of these functions. At first I am calling bits_to_rgb() then the output of it I pass as argument in ...
2
votes
1answer
31 views

Debounce counter for PIC micro - Suggestions for improvement

I developed this code for a vertical debounce counter for the PIC micro (PIC16F57). The code is called every 512 microseconds. It takes 5 bits from PORTB and compares it to a last known debounced ...
3
votes
2answers
25 views

Handle missing children nodes when parsing XML into a dictionary

I work on a code-base that uses xml to set up problems and specify model parameters. I've created a script that I run in tandem with our code. This script will ...
6
votes
3answers
100 views

Analysing a Huge Codebase with Python

I've written a Python program to analyse a huge C++ code base in excess of millions of lines of code. The job of the program is simply to search for all C and C++ style comments and extract all the ...
2
votes
1answer
42 views

Computing the sum of all measures for a certain group type

I have a method that receives 2 params: first one is an array of objects of type { group1: string, group2: string, measure: number, ... } second one is a string I also have an enum GroupColumns <...
1
vote
0answers
30 views

VBA Data dump code using transpose and timeline duplication

The below code ran in 2:26 which is way too slow especially as it's only 1/3rd of the total (the remaining 2/3rd does something very similar just on different sections). Is there something I can do ...
4
votes
3answers
135 views

Calculation of Energy Spectrum using C++

My purpose is to calculate the energy spectrum of three-dimensional turbulent flow from three velocity components. The calculation is too expensive. Therefore, I hope the calculation time can be ...
2
votes
1answer
28 views

Unefficent data wrangling in R

so I've been working with R quite a while now, but due to very stressful deadlines in my last university module I had, I wrote code that I'm not very proud of. I would like to be more efficient in ...
3
votes
2answers
99 views

NinjaTrader - Writting to MemoryStream then to Disk

I would like to make the below code more efficient by writing all text(CSV) to memory before writing to disk. The CSV file could have upwards of 10,000 or rows. With the current code, it opens and ...
4
votes
0answers
40 views

Elasticsearch update script using python bulk update

I'm using this script to bulk update docs in my index. I need to update a field of a doc in Elasticsearch and add the count of that doc in a list inside python code. The weight field contains the ...
1
vote
0answers
25 views

Get specific properties for all Active Directory groups and all their users, then combine them into CSV

I've written a script that gets a list of all groups in AD along with a few specific properties for each group (DistinguishedName, CN, Type, and Description). Then it goes through each group and, for ...
3
votes
2answers
100 views

Java 8: Memory/Run-time Performance optimization to transform Json structure

Here is the sample Students json am processing ...
6
votes
0answers
67 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 ...
5
votes
2answers
280 views

ASCII Random Walk Algorithm

I would like some advice on improving/optimizing a small program I wrote. What it does is run a random walk on a torus manifold with 8 colors that loop around. ...
3
votes
1answer
72 views

Cython with variable-length arrays

Dynamically growing arrays are a type of array. They are very useful when you don't know the exact size of the array at design time. First you need to define an initial number of elements. (Wikipedia) ...
2
votes
0answers
51 views

Extracting Excel cell format with Microsoft.Office.Interop.Excel in C#

I am trying to fetch the format (e.g. background color, border settings) of each cell in Excel file with Microsoft.Office.Interop.Excel class. I know that there are many tools could be used well in ...
4
votes
2answers
112 views

Merge/Insertion sort program taking longer than an hour to finish - C++

My program uses merge and insertion sort to sort a set of numbers. It works perfectly fine for small inputs, less than 2 seconds for 1,000 ints. But I need to sort 1,000,000 ints. When I try with 1 ...
2
votes
1answer
48 views

Improving performance of function to multiply vector with a matrix?

I wrote this function to multiply vector with a matrix and I was wondering if someone experienced can spot something can improved its performance. ...
2
votes
1answer
63 views

I want to get rid of unneccessary repetiton of cycles

I have a code that should read diameters of barrels from a txt file. If a barrel is smaller than the last one, smaller gets put inside bigger one. One package like that is lied on a stack. at the end, ...
2
votes
0answers
13 views

Pre setup script to get user metadata and check supported api's within the browser/device

Can this code be shortened or optimized, Written out this script to be used before node.js starts a few canvas elements and some vide streams. wondering if the initial checks can be shortend or ...
1
vote
1answer
35 views

Spellchecking Challenge - Implementing a dictionary lookup

I am trying to speed up the performance of this program. The only file we can change is dictionary.c The problem is basically to load a dictionary and then do a spell check on submitted text. The ...
7
votes
1answer
94 views

Polynomial multiplication using Karatsuba method

I am trying to solve a problem, which requires me to output the xor of all coefficients in the product of 2 input polynomials. Having seen that the normal O(n^2) ...
3
votes
2answers
91 views

Interactive Mandelbrot set pictures

The purpose of this project is to generate an interactive Mandelbrot set. The user can specify the degree of magnification from the command-line and click on the produced picture to magnify the ...
5
votes
1answer
44 views

Twitter contact scraper with Tweepy & Django

I created a project for academic purposes that works on Twitter data. It should: Get all friends and follows of the user Store them in MongoDB Display them in a table I'm using django + plain HTML, ...
2
votes
0answers
159 views

YouTube Data API v3: Modified version of YouTube trending that only includes videos from subscribed to channels

I have made a program that sort of mimics YouTube trending, but only with videos from channels that I am subscribed to. It looks at each Subscription, converts the ...
7
votes
1answer
362 views

Combinatorics, C++ and optimization

Note: I have a working solution, my question is about optimization and other approaches. Problem Description Hello, I'm re-writing an old program I made that solves nonograms. As part of solving it, I ...
2
votes
0answers
64 views

A graphing calculator

I wrote a calculator that can solve equations with variables using matplotlib and sympy. I am looking for tips on performance and style. How can I improve on this calculator? Is it a good idea to use ...
9
votes
4answers
1k views

Simulating Brownian motion for N particles

The following is the web exercise 3.2.27. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Write a data type that represents a particle undergoing a Brownian ...
4
votes
2answers
72 views

Data-type implementation for vectors and drawing a vector field as a test client

The following is the web exercise 3.2.12. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Write a program that draws a vector field. A vector field associates a ...
1
vote
1answer
69 views

Ideal ways for Choosing DataSet or DataTable

Required to know the performance overhead associated with DataSet and DataTable. When it comes choosing which data structure might be good and performance oriented what if single Result Set is ...
3
votes
1answer
103 views

Decimal to Binary converter

This program might seem lazy, I also tried iterating through the vector but performance was poor so I used this lazy approach that has more performance ...
-2
votes
1answer
103 views

Adding 1 million combinations of numbers to a file

The code adds approximately 1,720,000 different combinations of numbers to a file, some_other_file.txt. The numbers range from 2 digits long to 16 digits long. I ...
9
votes
6answers
1k views

Method to delegate command to other methods

Since I am working alone on this, I would like someone who would take a look and point out any mistakes or things I could have done better. My questions: How could I improve this big switch statement?...
2
votes
2answers
129 views

Testing extending a list [closed]

I am learning Python. I have a scenario in my current project to benchmark the following code snippet; by using refactoring to increase the performance. Upon deployment my code will be used on a ...
3
votes
2answers
85 views

Insert into array in reverse while iterating forward

So currently I have this function: ...
0
votes
0answers
46 views

How to simplify and optimize bitwise get/set operations on a large bit buffer in JavaScript?

tl;dr: How could you rewrite the buf_get and buf_set functions below to be most optimal? It took me a long time and a lot of ...
3
votes
1answer
136 views

How can I speed up my calculations with loops? Python

I wrote this code. But it works very slowly. I'm figuring out how many times I have to run the case generator to find numbers less than or equal to inv, in this case six. I count the number of ...
1
vote
1answer
51 views

function to check if word matches search word [closed]

I have the following which works but was wondering if there's a better way. Better meaning more efficient and or more compact. The function checks a trie to see if the word is in the trie. ...
3
votes
1answer
58 views

I need some suggestions to speed up my array manipulation code

I have a function which from an array of days return the array of days with it's date like from array of ['Sun', 'Mon', 'Tue', 'Wed' ] my function returns the days ...
2
votes
2answers
126 views

Finding unique keys

I made the following snippet. It finds unique keys based on their values. For all keys \$s\$ that are contained in another key \$D\$ with the same value, key \$s\$ is discarded and key \$D\$ is ...
2
votes
1answer
21 views

How to speed up drawing process of output from .tflite model

I have piece of code where I draw output from model pixel by pixel: ...
2
votes
2answers
79 views

String Mutator performance

I've made a very basic wrapper over a String that offers mutability in place (context: mono/XNA, budget is about 11ms per frame, 0B (ZERO, NIL, НОЛЬ, NADA) allocations hard requirement). Before that I'...
2
votes
3answers
128 views

C# Update account based on user order data. Nested if-else optimization with almost similar values

The method works, but I would like to know if there is any way to make it more readable, optimized? I have user data (i want to import/update it). Accounts is finded by user data. ======== User order ...
3
votes
1answer
44 views

Netlify plugin to generate CSP rules on the fly

The following code is a Node-based Netlify plugin to generate Content-Security-Policy rules based on inline styles and scripts. Inputs ...
5
votes
1answer
65 views

C++ Thread Server: Thread control & management

So I created a thread server that creates threads and associates them with a handle so that you can keep specific threads for specific tasks e.g. run all graphics rendering on thread 0, run physics ...

1
2 3 4 5
155