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)

2
votes
0answers
9 views

First time writing Cython (chromatic aberration)

This is the first thing I've ever written in Cython. ...
0
votes
1answer
30 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 ...
3
votes
1answer
34 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
37 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
42 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
12 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
60 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
318 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 ...
3
votes
0answers
31 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
42 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
52 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
62 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
27 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
76 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
46 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
45 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
42 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
66 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
45 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 ...
13
votes
4answers
643 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
61 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
61 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
212 views

Removing the extension from a filename

Let me know if the given code can be improved or optimized: ...
3
votes
2answers
143 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
55 views

Getting the individual digits of a number

Approach 1: Repeated division-modulus operations: ...
5
votes
1answer
190 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
63 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
27 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
66 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
47 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
56 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
35 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 ...
3
votes
0answers
32 views

Frequent subgraph mining program

I'm trying to make a programme that reads graphs from a .txt file, puts them in a vector, and finally puts the frequent closed graphs in another resulting file. ...
6
votes
3answers
67 views

Cross-platform performance and statistical information script

My usual disclaimer, I'm new to Python and scripting and I'm still studying the PEP8 guide, so please forgive any huge failures with respect to syntax, formatting and style. I'm open to any ...
5
votes
1answer
67 views

Cache aware, Key/value dictionary based on 4-bit(16-slot) Trie (Prefix Tree), with deferred allocation

Deferred allocation is a memory optimizing trick of using the Node** as Node* when there is only one item in the "bucket". Thus ...
2
votes
1answer
35 views

Implementing SQL function STR

I am writing a piece of code in c# that mimics the behaviour of following SQL function STR in the following case: ...
0
votes
0answers
15 views

Validating all of model's properties are accounted for in form using reflection

We have run into instances where someone would add columns to a table in the database, update the Entity Framework models for our solution, but forgot to update the forms to compensate for the added ...
1
vote
1answer
70 views

Convert seconds to hours, minutes and seconds

My logic is as follow: Convert actual time to minutes. Extract seconds from minutes (30:04 -> 4 seconds). Subtract seconds value from minutes (step1-step2) to get time only in seconds. Convert time ...
6
votes
1answer
57 views

D-ary max heap implementation

I implemented a D-ary max heap backed by a vector for resizing. I would like to know any possible improvements in performance, design, and in the code in general. ...
0
votes
2answers
43 views

Function that check's file type based on certain keywords

I have a function that breaks up a source file and checks each token against a keyword list to determine whether its a particular file type. How can I improve this function? ...
1
vote
0answers
17 views

Find nearest location

I am trying to implement a "find nearest location" from a given latitude and longitude using MySql. I have 8000 locations stored in my WordPress website. I managed to write this: ...
0
votes
0answers
33 views

Reducing execution time of an HTML parsing script

The script is intended to return an array with texts containing specific words in English and the equivalent texts in Polish from EUR-Lex - a website with EU documents. The script downloads the page ...
5
votes
2answers
406 views

Dijkstra Algorithm

I have implemented Dijkstra's Algorithm in C, using arrays instead of any structs. Here is my implementation: ...
10
votes
2answers
204 views

Undo format when format disappears

I was posed a question as follows: Given a sentence like "John is a bad man", lets say all the formatting disappears and you are left with one string "johnisabadman". Given a dictionary of words, ...