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
15 views

Porting x86 assembly that is used to increment a value

I'm working on a port of some existing inline x86_64 assembly code to AArch64 compatible assembly and would appreciate the feedback. I'll post below the original x86 and my ported AArch64 code. The ...
3
votes
3answers
27 views

Computation of inter-grid distance array for 2D lattice

I have a 2D lattice with U × U number of grids. My goal is to create an array – of shape U^2 × U^2 – where each entry denotes the least-distance between each grid and any other grid. Currently, for ...
1
vote
0answers
30 views

My AJAX LiveDateTime Object

The following JS code object displays the date and time and updates whenever it changes. It has a sendAjaxRequest() function dependency to make the AJAX requests. ...
4
votes
1answer
93 views

Extracting keywords from 3 billion CSV records

I am processing around 3 billion records using this piece of code. It's pretty slow; it would be really helpful if you could suggest better ways to do this. ...
3
votes
1answer
49 views

Sorting thousands of records

I have the following list to sort: A 0.53 B 0.56 C 0.56 D 0.98 E 0.33 Please note that my list may contains thousands of such type of records. I am sorting my ...
0
votes
1answer
22 views

Random fadeIn has unwanted pauses [on hold]

I have a title with each character and word split into a <span>, using lettering.js. I am relatively new to jQuery and ...
2
votes
1answer
34 views

Optimization for calculating statistics

I have collected a large amount of data about the train network in my country. Now, I am writing some code that calculates the average amount of delay on the entire train network, for each day, in a ...
4
votes
2answers
260 views

Simple java code measuring

I am trying to simply measure my code execution time. ...
4
votes
1answer
30 views

Implementation of the FNV-1a hash algorithm for 128-, 256-, 512- and 1024-bit

A little over a year ago, I asked this question. Since then, I've implemented the larger bit variations and am looking for any and all feedback - performance is obviously key when talking about ...
-3
votes
0answers
17 views

Please help me with the optimization [on hold]

Resources in my program are not exempt and with prolonged use application, it can take up to ~ 500 MB of RAM, which is not I do? How to fix it? If Could you see the source code and share advice. ...
2
votes
1answer
65 views

Determine the index where two lists diverge

Background A class provides an API to determine the index where two string lists diverge. ...
1
vote
1answer
32 views

Forming combinations of a 16 bit binary number

I wrote this code to form combinations of a 16 bit binary number (I know it is in output is string format, but it is my goal to just print all possible 16 bit binary numbers). My question is, can this ...
2
votes
1answer
40 views

Vitaly & Pie Programming challenge

I've been trying to solve this problem on Codeforces: Challenge description: After a hard day Vitaly got very hungry and he wants to eat his favorite potato pie. But it's not that simple. ...
6
votes
2answers
64 views

Convert a 24bit bitmap to grayscale

I wrote this so I can learn CUDA. This is coded to work on my laptop's Nvidia GeForce GT 540M. Main points I need reviewed: CUDA programming conventions Performance, especially kernel speed C ...
1
vote
0answers
44 views

Dynamic Programming with large arrays

Last week we have finished our program which applies a local search. At this moment the program needs more than three hours for the largest instances. The three hours are too long and we try to ...
0
votes
0answers
59 views

Time-course of drug amounts in the different compartments of a pharmacokinetic system

I am looking for a way to speed up applying my function to every individual in the data frame. Currently I am using the ddply but it is very slow for big data sets. ...
0
votes
0answers
24 views

Real time head segmentation using OpenCV

I am using OpenCV 2.410 to implement a project. My project allows to segment head from video sequence which get from camera. First, I detect the head region and then apply segmentation method for that ...
3
votes
1answer
32 views

TurboSort challenge

I recently started to do some of the exercises in CodeChef and I did the TurboSort challenge here is it's description. It works fine with smaller arrays but can't pass some of the tests due to the ...
1
vote
2answers
44 views

Increasing FPS of updateMobs

I am starting to experience frame rate issues in my game and I've tracked it down to my updateMobs function. I would like tips and code examples from you guys to ...
3
votes
2answers
82 views

Cook and Felderman analysis to perform data reduction on heated surfaces

This is a "pain", but I wonder if I can get any real speedup with the follow Python script - it is taking well over 10 minutes to calculate the way it is written now. (And that's only when feeding ...
1
vote
2answers
48 views

Binning and calculating a huge range of data

I have a code that I'm fairly certain does what I want. Bear with me as I explain what I'm doing: Imagine that there is 10 houses, where there can be one to an infinite number of persons. Each of ...
4
votes
1answer
35 views

Assigning values to a particular table column

I have a set of Excel data which I read and assign to corresponding columns of an Excel table. In our Excel we have provided the user the option to rearrange the Excel column fields at runtime. ...
19
votes
5answers
2k views
+50

Recording Audio Continuously in C

As an ongoing little side project of mine, I've been working on recording audio with the C language. You can see a progression of my code by looking at my past two versions (V1.0, V2.0). I've ...
5
votes
2answers
63 views

Knuth's Word Wrap Algorithm in Haskell

I put together a Haskell function for Knuth's word wrap algorithm. A simplified version of the algorithm is described here. I've already been told that there are certain aspects of my style that are ...
2
votes
2answers
44 views

Find index of an object with a specific value stored in an array

I am using the following code in order to retrieve the index for an object stored in a JavaScript array. Scripts works fine, but I would like your opinion regarding performance. Also would like to ...
0
votes
1answer
50 views

Eigenvalue calculation for a Java matrix library [closed]

After an interview didn't go smoothly, I decided to write my own library so that I would be better prepared if I'm ever asked about matrix multiplication again. I know that doing it in Java is going ...
3
votes
3answers
58 views

Maths Q&A game in JavaScript

This used to be university work now I put it our here for review purposes. Could this be constructed better? Is there any easier path, performance-wise? Could this be optimised? Which features ...
2
votes
2answers
33 views

Lo Shu Magic Squares

Is there a way that would be more efficient to write this same code? The program runs and works the way I want it to, but there is a lot of code and I was wondering if there was a more efficient way I ...
8
votes
4answers
751 views

Convert IP address to its binary representation

For a recent lab at the university we had to match the longest prefix for an IP (v4) address by using a Trie data structure. The code works fine, but it takes about 2 minutes to load a 14 million-line ...
-1
votes
2answers
39 views

Reading large text file from network (SMB)

I am facing performance issues while reading a large text file from the network. The same file is read locally without any performance problems: ...
4
votes
1answer
76 views

Large Matrix Square Difference Means

I try to transfere Matlab calculation to C and call it using .mex for speed gains. My goal is to perform for a matrix \$ B\$ which has roughly the dimension 10000x1000 \$ ...
0
votes
0answers
10 views

Reading inputs from a .txt file into an array efficiency please

Looking for a quicker more efficient way of entering the following code. Basically reading data from a file and if the first letter is P,B,E the file will contain different values. I'm unsure how to ...
3
votes
0answers
24 views

Bilinear interpolation using Neon intrinsics

I'm trying to do a Bilinear interpolation on the ARM Neon. However, I find that my vectorized code is slower than the regular one, on a BeagleBone Black. Any idea why this could happen? I'm using ...
0
votes
1answer
18 views

Search strings within a list from strings within a dictionary with the least complexity

I have the following input: newValue = [['men', 'John Doe,Chris perry'], ['women', 'Mary,Anne,Lita']] - list within list ...
2
votes
1answer
51 views

Non-blocking line-oriented input from several file descriptors

This is a follow-up to Extracting lines from a bytearray ; I got a pretty good answer to the narrow question I asked there, but was invited to show more of the code in case there was a simpler way to ...
3
votes
1answer
44 views

Combining CSVs using ruby to match headers

I am trying to write a ruby script that will take all of the CSVs in a given directory and map their headers out so that duplicate columns will match up and columns unique to a file will have their ...
1
vote
1answer
22 views

Extracting lines from a bytearray

This class is part of a utility that reads lines from a set of nonblocking file descriptors, blocking only when there are no complete lines to emit. ...
0
votes
1answer
50 views

Reduce nesting of for loops to increase efficiency [closed]

I need to optimize this code so it can execute faster, even if that means using more memory: ...
2
votes
0answers
27 views

Factoring a number

Here's my program for factoring a number. It works, but it's quite slow. I'm looking for suggestions for optimizing. The lines are indented just for readability. ...
2
votes
0answers
27 views

Comparison of sprite movement implementations

I've come up with two ways to do sprite movement with CreateJS, and I'm wondering if one is better than the other as far as performance and maintainability. The player data is saved in a json file ...
8
votes
1answer
139 views

Scraping my CS teacher's website, then emailing me when the site is updated

I've been working on creating an individual final project for my python CS class that checks my teacher's website on a daily basis and determines if he's changed any of the web pages on his website ...
3
votes
1answer
39 views

RPG game using XNA

I know this code needs some organization like classes, enums, methods, arrays or something but I just want to know if I could have created a character movement script, thereby shortening the code ...
7
votes
3answers
446 views

Checking if a number is prime

Is there a better way to check if a number is a prime? ...
1
vote
1answer
126 views

Project Euler 25 - 1000-digit Fibonacci Number

I have recently completed problem 25 from the project Euler site. The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 ...
5
votes
2answers
464 views

Project Euler 29 - Distinct Powers

I have just completed problem 29 from the Project Euler website: Consider all integer combinations of \$a^b\$ for \$2 \le a \le 5\$ and \$2 \le b \le 5\$: \$2^2=4\$, \$2^3=8\$, \$2^4=16\$, ...
4
votes
3answers
547 views

Nit picking performance on this search code

I am working on a fairly complex (at least it feels complex to me at the moment) search program and am looking to possibly increase the performance. Everything works exactly how I want it to, but I'm ...
2
votes
0answers
42 views

All combinations of a string with special characters

I have written a function which generates combinations of string by replacing 1 or more characters by the symbol "*". The code is as follows: ...
0
votes
1answer
24 views

Making events not trigger so often on a datatable with dc.js

I used this answer to make a table with datatables.net and dc.js. However, I detected a performance issue in this loop: ...
1
vote
2answers
45 views

Edit distance between 2 strings

I have written a program that calculates the "cost" of transforming one string into another. I would like you to review it. ...
6
votes
4answers
344 views

Constructing a JavaScript slide

I am a newbie to native JavaScript and am pretty much coming to grips with the operators, etc. At the moment I am currently constructing a slide. ...