Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.

learn more… | top users | synonyms (4)

1
vote
1answer
30 views

Extracting coordinates file that are inside a bounding box

I'm scanning a CSV file to see which values fit inside of a given box. The CSV file has X and Y coordinates, and the arguments to the function are the perimeters of a box (i.e, top, bottom, left side, ...
0
votes
0answers
16 views

Remove overlapping n-grams

I'm trying to write a compression algorithm that works by splitting the input into n-grams, and it's working, but I've start to run into a problem. This piece of code is supposed to remove ...
2
votes
2answers
36 views

Obstacle-spawning and movement scripts

I have these scripts I made that work absolutely perfectly as I need them to. Is there any improvements that can be done to these scripts and make them more efficient for Mobile Platforms? Or even ...
2
votes
0answers
43 views

Efficiently using Apache HttpClient in multithreaded environment

I have a library which is being used by customer and they are passing DataRequest object which has userid, various ...
4
votes
1answer
55 views

Palindromes that are sum of consecutive squares

I have been working on a Project Euler: 125, which took me ages to solve. The problem and source are cited below The palindromic number 595 is interesting because it can be written as the sum ...
0
votes
0answers
16 views

Three functions to make a JSON array

Currently I'm using these three functions, that in the end produces a JSON array. I went this way so that I could fetch data from a specific table. But now it just seems bloated and poorly written, ...
3
votes
1answer
25 views

Converting images to greyscale using JuicyPixel

I would like to use Haskell to do some image processing so I have been writing small programs to test performance. I wrote a program to batch convert PNG images from color to greyscale. I compared the ...
3
votes
2answers
86 views

Largest palindrome product

From the Project Euler challenge series: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest ...
2
votes
1answer
67 views

Finding the two largest three digit numbers missing from a text file

Hear this problem: Write a C/C++ program that reads all the values from the "BAC.TXT" file and determines which are the two largest three digit numbers that are missing from the file using a ...
2
votes
2answers
44 views

Excel Data Manipulation - parse, match and create

I've got a simple Excel Data Manipulation Script to match one of my daily tasks, written in python 3. Intro Let's assume that I have 3 excel files: main.xlsx, ...
2
votes
1answer
36 views

Sales report for an invoicing system

I am creating a sort of Sales Report for an Invoicing System. I have an extremely complex MySQL Query that takes a very long time to execute (usually about 10 - 15 seconds). It involves multiple ...
0
votes
2answers
41 views

Acquiring all products with a particular license ID

I am working on refactoring this method on the API. It's very slow, and can take the browser 12+ seconds to receive the result from the API. Can someone give me something to get me started or point ...
2
votes
0answers
13 views

Data import “upsert” from a SSIS package

I have the following "upsert" trigger in SQL Server 2005, which is handling a large data import from a SSIS package. It is taking a very long time to complete - I suspect due to the concatenation and ...
4
votes
1answer
32 views

Secure file system utility functions

For Khronos, I've had to develop these utility functions to help me deal with storing the .wav files. However, they could also be used in a variety of ...
1
vote
2answers
43 views

Reading CSV files and inserting in a SQL database in VB.Net

This program reads all files in a folder and subfolders line by line, converts them in a supported character set, replaces all unsupported characters and inserts them in a SQL database. My idea was to ...
-1
votes
0answers
51 views

Real-time polling without the CPU Spike in C#

I am reading a signal off of a meter using a managed C# wrapper on a C++ object. In order to calculate the value of the meter, I need to determine the length of time from when the signal goes from 0 ...
7
votes
1answer
139 views
+50

The birth of my intelligent assistent: Khronos

I've done a lot of reworking to this main file recently, in regards to using a new speech recognition engine and integrating the last reviews suggestions. My question before is going to be phrased ...
8
votes
3answers
167 views
+50

Composing QGIS expression based on a QGIS layer tree

I am developing a plugin for a GIS (Geographic Information Systems) software which uses Python. I have been using Python for over a year (on-off) and have the following code which works. It basically ...
1
vote
1answer
57 views

How to optimize Method Visibility and code structures for better performance?

I'm creating an application to get data cross domain all the line of code seem work as well but I'm not much understand about performance with my code process with the real server and real action ...
4
votes
3answers
95 views

Simple file renamer in C

It's been some time since I wrote something in C. I am looking for some advices related to my code in terms of coding style, bad/wrong logic, optimization (performance) and good practices. The code ...
1
vote
1answer
110 views

Fast Document Distance, C++

This is an attempt at a fast "document distance" implementation in C++. For reference, I found this problem in MIT's OpenCourseware 6.006 algorithms course. A quick look at the ...
2
votes
1answer
50 views

Optimizations for bubble sort

The code performs bubble sort on the basis if any swaps has been performed in the iteration. I made it sort of independent of number of iterations as in any conventional bubble sorting code. I went ...
1
vote
0answers
66 views

Simple Java Encryption/Decryption

I am a beginner at Java programming, and I'm always curious about how to make code more efficient or learn what I am doing wrong. I just started learning about cryptography, and this is a simple ...
1
vote
0answers
31 views

Methods to add and check elements in a Bloom Filter

I have a working Java implementation of Bloom Filter. These are the methods to addElement and check for an element. ...
2
votes
1answer
41 views

1-dimensional and 2-dimensional Peak Finding Algorithm

I have the following code for a peak finding algorithm in Python 3.4.3. A peak is an element that is not smaller than its neighbors. ...
4
votes
0answers
35 views

No-copy cache line aligned function storage object with small object optimization

I have implemented a std::function-like class, that is optimized for storing lambdas, that never copies the stored function, that has a small buffer to store ...
1
vote
0answers
37 views

Performance of critical function (STL transform)

I have finished the first part of my project, i.e., getting a full working program. However, the performance is not too impressive. The function ...
2
votes
1answer
59 views

Dynamic multidimensional arrays

My application needs Field objects, which encapsulate 1D, 2D or 3D gridded data. The number of dimensions and their size are known only at run time. Furthermore, I ...
0
votes
1answer
32 views

Counting distinct lists in a list

I'm trying to remove the duplicate from the list and count the list after removing the duplicates ...
1
vote
0answers
57 views

OpenCV-based wrapper for Windows screen capture

I have written a ScreenVideoCapture class that implements an interface for capturing frames from a specified monitor connected to the PC. It uses OpenCV structures ...
-5
votes
2answers
46 views

Rewrite 12 consecutive ints based on bizarre logic

Despite looking terribly ugly, it is pretty interesting due to some specific connections to cellular automata theory. I'm looking for ways of simplifying it further. This program takes 2.7 seconds to ...
6
votes
1answer
73 views

Computing six dot products involving one common input vector

I have created a Matlab Simulink model with a series of dot products. Embedded Coder generates a for loop for each dot product, as evidenced by this excerpt of the generated output: ...
5
votes
2answers
78 views

Monte Carlo simulation of amoeba population

I wrote a simple Python simulation to answer the "Amoeba" population question posed here: A population of amoebas starts with 1. After 1 period that amoeba can divide into 1, 2, 3, or 0 (it can ...
4
votes
2answers
47 views

Re-arranging a list into columns

In short, what this script aims to do is take the following data: 1 Alpha Beta Delta 2 Beta Echo Foxtrot Kilo 3 Alpha Kilo 4 Beta Echo Kilo Zulu And re-arrange ...
0
votes
0answers
22 views

Prefetch in ARMv7

I have to implement Khatri Rao product between 2 matrices in C. Mathematically this is a column major access of data and I can not change that. But if I use preload ( PLD instruction in ARMv7 ) to ...
4
votes
1answer
64 views

JavaScript calendar widget

I'd like to know how I can refactor my JS code for usability. Currently my JavaScript uses some HTML to build out a simple calendar with the following functionality: a. opens into the current month ...
4
votes
1answer
81 views

Calculating running average in Java

I have a library which makes HTTP calls to my service. I was trying to calculate running average of how much time my service is taking on an average. Here is the core logic of how I am calculating ...
1
vote
1answer
35 views

Finding cointegrated pair with minimal t-score

The function findMinimal() receives a tuple from a list which contains 171 tuples, each of them go into the function one by one and, for each tuple, it searches the ...
0
votes
1answer
19 views

Cut Specific Rows and Paste to New Workbook Faster

I'm quite new to trying to write my own macros and I've been able to piece this one together, but it takes quite some time to run. Below is the macro for one value (I have to create workbooks for ~20 ...
9
votes
2answers
134 views

Finding a string whose MD5 starts like the digits of π

I tried to make a program to find a string whose MD5-hash starts like the digits of pi, where dot is omitted. Is there a faster way to do it than this: ...
0
votes
2answers
56 views

Effective Python 2/3 two-dimensional array initialisation

Recently I noticed that the idiomatic python two-dimensional array initialisation is extremely slow. I am wondering, is there a good, proper way of doing this simple task fast? Also, are those two ...
2
votes
1answer
49 views

PHP Custom $_GET checker function performance

I'm trying to follow the DRY programming philosophy and I am tired of running isset() and an if not empty statements for each ...
1
vote
1answer
43 views

Longest Palindromic Substring

I wrote the following code for this problem. The problem is to find the longest palindromic substring. I think it is correct and is working correctly for all the test cases I entered myself. Now, the ...
1
vote
1answer
41 views

Demographics information for EDI report

I am going through some of my companies EDI reports to see if I can make them faster. The query below runs in less than one second in our AWS RDS environment, but it takes ~55 seconds on a blade in ...
4
votes
0answers
59 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 dfs on it. How can I make the ...
5
votes
0answers
47 views

Making a logic Prolog compiler simpler with Java

Good morning! I'm student in philosophy taking some course in programing in order to have a better understanding of artificial intelligence. I'm actually doing my own Prolog compiler just like SWISH ...
5
votes
2answers
237 views

Extracting values from dictionaries where the keys match

I have two Dictionaries with around 65,000 KeyValuePairs each. I used foreach and if-else statements to compare them and get values, but it goes very slow. How could I optimize my code and gain more ...
-1
votes
1answer
87 views

Motorola 6809 Prime finder

I'm trying to make a small program which takes a number (form 1 to 1000) and shows the primes between 2 and that number. Right now I have a quite functioning program (except a couple of bugs), but the ...
1
vote
0answers
21 views

SQL query with nested subqueries

The following query is taking over 800ms to run, and returning 300 rows. ...
2
votes
2answers
67 views

Adding two singly linked lists in C++

I took a challenge from a web site. I aim to have a runtime performance as good as possible. My solution was accepted, though I think it is not the most efficient because I saw others having a faster ...