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 (2)

0
votes
0answers
13 views

VertexBufferObject Implementation

I have been working a simple 2D Game using C# language with OpenTK (OpenGL wrapper/binding for .NET), and fyi: it uses a lot of sprites.. Since it uses lot of sprites, I think it's important to make ...
5
votes
2answers
94 views

Solution to the 0-1 knapsack

I'm using a one-dimensional array with length \$W(\text{weight capacity})\$. Is this is any better than the solutions with a two-dimensional array \$W, n\$ where \$n\$ is the number of items? I'm ...
2
votes
1answer
22 views

Create a text index of files

This program creates a text index of 3 different files in Python. While this works correctly, I am still a beginner in Python. I used a list of class objects. Can this code be further optimised? ...
1
vote
1answer
58 views

Listing movies for torrenting

Can I get some help on shortening the amount of code I have in this program? ...
6
votes
3answers
61 views

Function which finds the sum of factors from one to N

After optimizing my function which I plan to use in Project Euler 95, I've run into a wall concerning further improvements. This code is destined for my library of project Euler functions, so while ...
5
votes
1answer
46 views

Parsing and plotting complex numbers

I am trying to write a Haskell application that parses a bunch of complex numbers from a Mathematica output and then produces a PPM image. The end product looks like this: The code to create this ...
8
votes
0answers
30 views

Inefficient differential converter

Following Pimgd's question, I decided to take a look at the TIS-100 myself. This is my solution to the 3rd challenge, building a differential converter. Requirements: Read values from IN.A and ...
1
vote
0answers
19 views

Chaining function for range-based for loop

Motivation: I'm relatively new to C++. I'm writing a function meant to be used with range-based for loops. The goal is to be able to iterate over multiple containers at once, each in turn (essentially ...
4
votes
2answers
143 views

Searching within multiple objects of the bucket

I have millions of files in the Google cloud storage's bucket. I want to search within files with a .index extension and retrieve the contents. This is currently what I am doing, but the time ...
2
votes
1answer
44 views

HackerRank Regex Challenge: Detect HTML Tags

Problem Statement In this problem you will use regular expressions to help you detect the various Tags used in an HTML document. Here are a few examples of tags: The "p" tag for ...
2
votes
0answers
32 views

NHibernate multiple select queries

I have a service called "Roles" allowing me to retrieve all 'items' on which I have permissions. I'm experiencing a interesting performance issue with NHibernate ...
2
votes
0answers
25 views

Non-blocking Unix domain socket

I've developed quickly two kinds of socket use: the first with blocking mode and the second with non-blocking mode. The sockets are Unix domain sockets. My problem is that the kernel consume a huge ...
3
votes
1answer
34 views

Chromatic aberration

surface is a pygame.surface object from the Pygame graphics library. It actually runs way faster than I thought it would for a ...
0
votes
1answer
38 views

Brute-force word cracking program using /dev/urandom

I've been having fun with this program and trying to use different methods and such to achieve the fastest possible word cracking program I can come up with. I'm pretty happy with my current program ...
4
votes
1answer
46 views

Java 8 find array of countup sums

I have an array of some arbitrary int values; I want to find the array containing the sum of the past elements in the current index. Example: ...
1
vote
2answers
53 views

Emptying and populating an element in jQuery

I have written the following function to empty and then populate multiple elements using jQuery: ...
0
votes
1answer
47 views

Smearing estimate with Fortran

I wrote this Fortran module and I need its subroutines to run as fast as possible. My hope is to get some advice to optimize this code, and after having the serial version running as fast as it can ...
2
votes
0answers
13 views

GUI for Selenium web testing

I am wanting to build web-based testing tools for test website environments utilizing the Selenium Web Driver. I am building a GUI which will contain the following: Drop-down for selecting the ...
1
vote
1answer
65 views

Populating an array from a database

I have a query that populates an array from the database. In some cases, this query returns a great amount of data, (let's say for purpose of an example, 100.000 records). Each row of the database has ...
7
votes
5answers
342 views

CodeEval Challenge: Remove specified characters from a string

Question Write a program which removes specific characters from a string. The first argument is a path to a file. The file contains the source strings and the characters that need to be ...
4
votes
1answer
39 views

CMake build system

I wasn't quite sure where to go with this, and this seemed to be the best place I could think of so I thought why not. I threw together a build system for C++ projects today using CMake and I wanted ...
4
votes
1answer
56 views

vector3 math module

I'm writing a little math module in C to handle vectors and matrices. This will be column-major style but right now I've only finished the basics of the vector functions and wanted some feedback on ...
5
votes
1answer
54 views

Compute spherical distance matrix from list of geographical coordinates

I've got a list of geographic coordinates ([lat, long]) and want to compute the corresponding matrix of distances. Distance shall be spherical distance in km. ...
2
votes
1answer
35 views

Fill missing values based on group

I am trying to fill values based on group, in my case id. I would like to fill the missing values according to the available ...
4
votes
1answer
63 views

Matching strings

Basically I solved this question on one of the competitive websites: Given the total n number of String on first input, n input follows: We have to find such pairs of string (i,j) such that ...
0
votes
2answers
28 views

Image-uploading

This currently works properly, but just takes too long. Some of the functions in it are necessary and need to remain, such as resizing, and double saves. But it probably has room for improvement. I ...
2
votes
1answer
77 views

Mth to last element

This is a challenge from codeeval Write a program which determines the Mth to the last element in a list. Input sample: The first argument is a path to a file. The file contains the ...
3
votes
0answers
57 views

Quick sort implementations

I made a compendium of different known quick sort partitioning methods, implementations and pivot choosing methods. Any kind of improvements are welcome. Partitioning methods: ...
5
votes
1answer
46 views

High performance parsing for large, well-formatted text files

I am looking to optimize the performance of a big data parsing problem I have using Python. The example data I show are segments of whole genome DNA sequence alignments for six primate species. Each ...
3
votes
0answers
47 views

Sorting colors by the name of the color

I was in need to sort Colors, so the first thing that I tried was this: ...
3
votes
2answers
67 views

Recognizing a sequence read through OCR software

I am trying to recognize a sentence that I have read through optical character recognition software. This code will eventually run on a Raspberry Pi. I know for certain that it's meant to be one of a ...
6
votes
1answer
48 views

“Heat spot” image generation using bilinear interpolation

This is the code from my answer to a another CR question. My goal was to provide a fast and simple computation and I'm rather unsatisfied with it. It's maybe 10 times faster than the original, but ...
14
votes
4answers
662 views

checkmate - C spelling corrector 2.0

Since I posted my first version of the spelling corrector here, I've been working on improving it a little in my free time. I've also gone ahead and put the project up on Github so that others can ...
2
votes
2answers
64 views

Matrix Multiplication Python — Memory Hungry

Here is a snippet from my python script where I am performing: a dictionary lookup a cartesian multiplication of a list of len=500 against a list of len=60, calculating a cumulative addition for ...
0
votes
0answers
39 views

Optimising nested for loops Java [closed]

I am having a code that does scheduling of a days events based on the exact fit basis. I am kind of having three nested for loops and I'd love to hear thoughts on ...
5
votes
1answer
63 views

Permutations of a list in Haskell

I have this piece of code which given a list returns another list which combines every element with every other element (without repetitions) using a given function as a combiner. I came up with three ...
2
votes
1answer
42 views

Insertion sort via recursion

I'm learning about algorithms and have been recently experimenting with insertion sort via recursion in Python. My code works fine, but I was wondering if there are any possible improvements that ...
2
votes
4answers
216 views

Removing the extension from a filename

Let me know if the given code can be improved or optimized: ...
3
votes
2answers
144 views

Returning the length of the File in B/KB/MB

The method length() in File returns the length of a file in Bytes, this code transforms that into b/kb/mb as can be seen in the ...
1
vote
1answer
56 views

Getting the individual digits of a number

Approach 1: Repeated division-modulus operations: ...
5
votes
1answer
195 views

Preparing a YouTube downloader based on Windows form

The program this function was written for is a Windows forms program. This function downloads videos from the internet one after the other. It runs in a separate thread (so the user can drag the form ...
2
votes
0answers
65 views

C# port of data mining algorithm much slower than reference implementation

I was trying to implement the algorithm specified in this research paper (please ignore the math, since it's irrelevant to the question). This algorithm is very basic in formal concept analysis. The ...
7
votes
1answer
58 views

Poker probabilities finder

This code finds the probabilities of the various scores in Poker. It uses a Monte Carlo approach, in which, two million (\$2 \times 10^{6}\$) hands are simulated and evaluated, not an exhaustive ...
3
votes
1answer
28 views

MEF Execute Plugin Exports in Threads

I am developing a service application that would implement a peer to peer messaging system. I am wondering if my following code is the best approach. It works, but I am naive and it would be nice to ...
-2
votes
0answers
67 views

Low performance of pythonic N^2 loop

This code is taking more than half an hour for a dataset of 200,000 floats. ...
2
votes
1answer
26 views

Creating and manipulating a variant number of bufferedImages for vision algorithm

I'm developing an algorithm that takes structured light patterns to determine 3D properties of objects. This class builds the structured light objects. It creates a buffered image, and based upon ...
4
votes
2answers
52 views

Find the highest occurring digit in the prime numbers present between L and R (both inclusive)

Given two numbers L and R, find the highest occurring digit in the prime numbers present between L and R (both inclusive). If multiple digits have the same highest frequency print the largest ...
4
votes
1answer
54 views

Red-black tree not matching performance of Java's TreeMap

This program is for constructing a symbol table where a key is a word and value is the frequency of the word in a text file and finding the word with maximum frequency. I did it in two ways: First I ...
6
votes
0answers
58 views

Tkinter GUI for making very simple edits to pandas DataFrames

It is part of a separate application that allows users to interact very loosely with different databases and check for possible errors and make corrections. ...
4
votes
0answers
36 views

Outputting scatter plots

I have written a python function that outputs scatter plots using Matplotlib after processing the data a little. It works but it's painfully slow. I was wondering if anybody had any suggestions as to ...