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

2
votes
0answers
21 views

Careful simulation of a 3D space [on hold]

What is an accurate computer-description of space? I've been building up my abilities with various population simulations, and I'd like to add a spacial element to them now. I'm self-taught with ...
1
vote
2answers
49 views

Filtering by value X from array Y with a fallback

I wrote a function that solve a special problem. But one of my 'special hardcore software engineers' told me that this is a bad solution - but he will not give me a better solution. So I ask you: What ...
1
vote
0answers
21 views

Efficient C Code Alternative to MATLAB's im2col

The function im2col in MATLAB is very useful to vectorize Patch based Image Processing algorithms. The problem is the function isn't optimized and doesn't use C ...
2
votes
1answer
57 views

Interview task to efficiently find compact representation of nodes in tree and find big O time

I recently had an interview problem where I was asked to find a compact representation of nodes in a tree. As an example, consider the following tree: ...
4
votes
2answers
56 views

Custom MultiIterator with type filter

I'll start with giving a bit of background as there are many classes involved and I can't attach all of them because that would make this question wildly too long. For the curios they can be found at ...
3
votes
0answers
21 views

jQuery cycle content of static HTML page

I am making a simple jQuery code that changes the content of a static HTML page when a button (previous/next aka left/right) are pressed. The page is static, so the content that must be cycled (images ...
1
vote
1answer
56 views

Large arrays make runtime very slow

So I have the following code that takes the input of two arrays, and apply some queries to match elements from DBpediaClassesArray with elements from ...
4
votes
1answer
49 views

Writing a faster mutable trie

I am implementing a mutable trie. I tested and it produces correct results. However, it is very slow. I benchmark it against plain old Data.Map, which is more than ...
5
votes
1answer
61 views

Increase the speed of this Caesar Cipher

Here's my attempt at a Caesar Cipher encoder/decoder. If given a key, it will encrypt the given string. However, if you do not specify a key, it checks each of the 26 possible keys and returns the ...
2
votes
2answers
10 views

Performance of RegExp vs Rune Loop

I was recently talking to someone about a function I wrote to mimic (very basically) the string interpolation function String.Format() found in the C# language. ...
0
votes
3answers
73 views

Linq query performs poor according to performance analyzer in VS2012

I've a Linq query that performs poorly: ...
2
votes
1answer
72 views

Opening contents of a file using Swing and SwingWorker class

I want to open a file contents using swing. For this I used the SwingWorker class. This application took more time (more than a minute) to load a large file ...
6
votes
1answer
51 views

Bitmap problem performance boost

Problem statement: Input is a rectangular bitmap like this: 0001 0011 0110 The task is to find for each black (0) "pixel", the distance to the ...
1
vote
2answers
65 views

Using brute force to find an energy optimal path for a given amount of time

The code below implements a brute force method to find an energy optimal path for a given amount of time t_aim using recursion (the recursion function is ...
0
votes
3answers
7 views

Improve jQuery performance - should window.location.href be variable?

We have search results on our website and want to display different banners based on the search term entered. My solution for this is to check the URL for the search term since it is stored there, and ...
3
votes
1answer
38 views

Creating a fast Android dictionary (word counts)

This is a follow-up of my question here: I am currently working on an application for various statistics. One task is to analyse a good amount of sentences for their word counts. The specifications ...
3
votes
1answer
58 views

Where is the bottleneck in my Cython code?

The profile tells me it took ~15s to run, but without telling me more. ...
7
votes
1answer
98 views

Incrementing letter-spacing of one line of text

I was asked to create a script which will increment the letter-spacing of one line of text, until its width matches that of the first line; for use in headline/subheadline text to maintain a block ...
0
votes
1answer
33 views

Ruby Optimize Performance

I'm trying to do the Reverse Groups Challenge on Codeeval. My logic is function but when I try to submit my solution is says that timed out at 10 seconds. How can I improve the speed here? ...
2
votes
0answers
38 views

Circle Shadow Experiment

I'm trying to create a light system, with the midpoint algorithm and Bresenham Line Algorithm. I'm trying to redraw all the time (1 option) or redraw when I need to. When the circles are too big it ...
1
vote
0answers
10 views

Creating a “Produce and Consume” using Swingworkers

I am experimenting with the produce and consume concept while trying to incorporate it into my own project. I basically have two Workers in a small example I made: ...
1
vote
0answers
33 views

Neighbours from point connections

I am working with a mesh of triangles (in 3D, although I doubt it makes a difference). The mesh is given as list of lists, each list containing the indices of the three vertices of a triangle in said ...
7
votes
2answers
52 views

Benchmarking of SQL data crunching using a common datum

@nhgrif and I were curious about a couple different ways to aggregate a number of records based on a duplicate/common datum. Two different ideas will be shown. Any advice on all code but especially ...
2
votes
1answer
47 views

How can I make this implementation of Euler's method more efficient?

I have an implementation of an Euler method for solving N-many 1st order coupled differential equations, but I feel that I did not write it as efficiently as I could, due to lack of programming ...
4
votes
2answers
56 views

Simple LRU cache with an expiration time

How can I improve the performance of the code below? ...
0
votes
1answer
64 views

Find number of inversions in a given array

Can you please give me a hint on how to improve performance of the following algorithm meant to find the number of inversions in a given array? ...
6
votes
3answers
69 views

WSGI static file handler

I put up a simple WSGI static file handler, but I'm skeptical about its efficiency, also because I got a handful of errors while benchmarking it with Apache Benchmark. The errors are: ...
0
votes
1answer
64 views

Reducing the sorting time of a large number of numbers

I have to sort many large numbers in a given time limit. The program below works, but not when the test cases reaches \$10^6\$, in which case it exceeds the time limit. ...
3
votes
1answer
29 views

Calling PHP file using Ajax

I like to know if there will be any performance issue if an xmlhttp object is created every time. For example, in the below code: ...
5
votes
3answers
60 views

Insertion sort revised with output to console

I took the question Performing insertion sort in C# and tidied it up a bit, then I thought about the use of the arrays and was wondering if it worked, and it does. So now I have 3 static methods in a ...
6
votes
2answers
48 views

External / File-based mergesort

I've implemented an external mergesort to sort a file consisting of Java int primitives, however it is horribly slow (fortunately it does at least work). Very little happens in the sort method: it ...
11
votes
2answers
207 views

Why is my Neural Network so slow?

I have some neural network Julia code which I'm hoping to speed up. It's possibly simply poorly-designed, but I'm not convinced. ...
4
votes
0answers
26 views

Fowler–Noll–Vo hash function in Lua

I recently coded this FNV-1a hash function in Lua. Are there any apparent performance improvements that could be implemented? ...
3
votes
1answer
46 views

Inserting data in 3 tables of a database with JPA

I am starting a personal project and my first step is to insert a lot of statuses from tweeter in a database along with it's user and place (if applicable). This is the database structure: Pretty ...
4
votes
2answers
93 views

Converting a string to various number formats

I'm working on a set of PostgreSQL helper classes, and am representing each PostgreSQL data type as objects. Instead of creating a class for each number format, I've created a template so the user can ...
5
votes
1answer
56 views

Event Delegation Directive

In use cases where web applications utilize ng-repeat heavily and also rely on event triggers for each item in the collection, such as ...
6
votes
1answer
58 views

Traversal of descendants using stack [closed]

I have a type Unit which has a property ChildUnits that returns the children of the unit instance, as a ...
8
votes
3answers
133 views

Speeding up execution time of worksheet-formatting code

I've been writing some code that places some data in an empty worksheet and then formats the sheet by adding borders to all of the used cells. The code functions how it should perfect, but it takes a ...
3
votes
1answer
54 views

Optimize spreadsheet-filling routine

I'm stuck with the slow VBA routine below, which I think is the cause of lagging (taking to long). I was wondering if there is a faster way to do this: ...
4
votes
2answers
103 views

My first model test in PHPUnit

I've just created a test to create my table gateway class. I've written about 8 tests and all are passing. I'm hoping anyone can offer any advice on what to do next to make these better. This is quite ...
11
votes
3answers
177 views

Substitution cipher algorithm performance boost

This algorithm is meant to read a string of numbers on an input, a naive substitution cipher code (A = 1, B = 2, ..., Z = 26) and output the number of ways the code could be interpreted (e.g. 25114 ...
6
votes
2answers
86 views

Trim() every string in a JavaScript object?

We have a database with fixed width columns. The API is really simple and returns everything the database does with little to no actual processing. This results in some unnecessarily long strings in ...
12
votes
7answers
2k views

Checking if two strings are an anagram

This is my sample code to check if a given pair of strings are anagram or not. ...
12
votes
3answers
171 views

SQLConnect - A library for connecting Objective-C/Swift applications to Microsoft SQL Server

The complete SQLConnect library can be found here. The file from which the following method belongs can be found here. At some point I may or may not open questions for reviewing other aspects of ...
2
votes
2answers
93 views

90 year data simulation in need of performance increase

I developed some code for my masters project that will simulate 90 years daily data using 1000 different data sets. The code is working fine and gives the correct output that I wanted but the ...
1
vote
6answers
115 views

Looping through an array of strings containing approximately 3 million lines of strings

I have a function that loops through an array of strings containing approximately 3 million lines of strings. My problem is this loop is running too slowly and I want to know how to make it faster. ...
12
votes
2answers
384 views

Efficiency/design of trim() library code

I am working on some library code and I am trying to optimize my trim() functions. To that effect I am trying to figure out how best to deal with each kind of ...
3
votes
2answers
125 views

Generic Sudoku solver might have too many iterations

I'm trying to implement a generic Sudoku solver (with n x n puzzles). The puzzle itself is contained in the class Feld with: ...
2
votes
1answer
108 views

iMacros bot for performing refreshes

I'm trying to simplify this code. It seems everything runs as it should; however, when in the refresh loop from iMacro, it seems a little inefficient and can take up to 7 seconds to fully execute (it ...