Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.
2
votes
0answers
17 views
Optimization with a lower value constraint for positive solutions
Let \$D\$ be a \$N\times N\$ positive definite matrix. I am minimizing a quadratic funtion
$$ f(w)=w^T D\ w$$
with respect to the weight vector \$ w=(w_1, w_2, ..., w_N)\$, subject to the ...
3
votes
0answers
27 views
File deletion takes a long time to delete files
I have a script I need to "duplicate" and modify to allow it to delete certain images based on properties I give this app/script. Currently the script just moves/sorts the images into folders based on ...
4
votes
1answer
31 views
Optimizing bilinear interpolation
I have spent countless hours trying to speed up my bilinear interpolation up. I even tried implementing an SSE version (a double version and a float version), but that was even slower than this ...
1
vote
1answer
16 views
Quickly passing and parsing variable length float arrays
I have this code for parsing for parsing a list of floats of variable length.
...
0
votes
0answers
16 views
Monte Carlo Pi with R + Fortran + MPI
I created a R package to calculate Pi with a Monte Carlo simulation.
My goal is to optimize the parallel function SnowPi as much as possible. This is the ...
1
vote
1answer
28 views
Framerate Measurement Utility
As part of a project I'm working on, I need to measure FPS. In the past, I would do this within the actual project itself, but recently I've been trying to implement more abstract (and reusable) ...
0
votes
1answer
22 views
Query performance of this Select Where each Column is a Select
I would like to know how to improve the performance of the following query:
...
1
vote
1answer
13 views
Live price update with options
I'm very new to JavaScript, so I'm not sure how to optimize the following code (which seems to run fine) further, though I did try to implement a few tips found on the web — such as using local ...
3
votes
2answers
26 views
Extracting and normalizing URLs in an HTML document
I have written code to get all urls on a webpage & put them in a set, and would like tips on simple changes I can make to increase its performance.
...
4
votes
1answer
33 views
Hide and un-hide rows then sort on Worksheet_Activate event
We used this VBA code mainly to hide blank rows and unhide non-blank rows. After that, the second code sorts the rows by a defined column value once the worksheet activates. This process takes too ...
2
votes
5answers
81 views
Sudoku solver in Ruby
All the test cases pass except one of the test case which runs > 10 seconds. What can I do to make my solution faster?
...
4
votes
1answer
57 views
5
votes
1answer
79 views
Classic two-player memory game
This is a classic memory game with a points counter for the two players.
The app works fine, but since this is my first project in Swing, I would appreciate the critical opinion of some expert, as ...
0
votes
0answers
30 views
Creation of a list of 1000 items with Backbone
I'm really new to web developing and Backbone. I would like some advices for better performance on this program I have written. I tried to write a program similar to these: React vs AngularJS vs ...
4
votes
1answer
50 views
CodeEval solution to find trailing strings
This is a problem in CodeEval, moderate level. The problem is very easy for this level. But I am not able to get more than 60 points for any solution I submit. (Moderate levels highest score is 65 and ...
4
votes
2answers
157 views
Calculating the number of steps it takes to get from point S to F
I have following Java class called TheNewMario. It reads a String path and iterates through the path from ...
2
votes
0answers
18 views
Scanner in Scala
I wanted to implement Java' Scanner in Scala. The goal for this class is to:
Implement a Scala collection interface (probably Iterator[String]?) so I can access ...
2
votes
0answers
28 views
Optimizing OpenCV's undistortPoints
I am working on improving the runtime of code that undistorts every pixel point in an image. Currently each point is undistorted via a call to ...
2
votes
1answer
51 views
Skill tree helper
I'm working on a skill tree calculator for a game and I made a method that checks whether or not it can subtract a point from the skill and then proceeds to do so. Everything is working as it should, ...
5
votes
1answer
45 views
Untouchable Numbers
I wrote this program in response to a CodeGolf challenge that required generating this sequence of "untouchable" numbers. This sequence can be found on OEIS as A005114.
My initial implementation was ...
3
votes
1answer
151 views
Shortest path in image
This code takes an image and detects a global shortest path from the top to bottom row, with the requirement that top and bottom column index be the same. For this, it scans through each element on ...
5
votes
3answers
89 views
Guess the bigger number out of two random integers
I want to make my code more efficient by instead of repeating my code again for level two, as the only change from level one to level two is the random numbers change from ...
3
votes
2answers
73 views
HTML5 Canvas game starts to lag 10 seconds after loading page
I got bored and started making a game using HTML5, CSS3, and JavaScript/jQuery. I've been working on it for about 2 weeks and it was running pretty well.
Today I opened it and was moving the ...
2
votes
0answers
18 views
Iterative procedure to get 3D coordinates from distance constraints
Imagine you have a series of n points randomly generated in a box in 3D space. You also have a list of distance bounds, e.g. points 5 and 3 should be between 1.0 and 2.0 Angstroms apart.
There are ...
2
votes
0answers
22 views
Google Maps convenience object
I have added the full code of my current Gmap component, which is a convenience object to abstract Google Maps functionality:
...
2
votes
2answers
53 views
7
votes
1answer
41 views
Assembling a Sequence
I've completed the "Sequence Counter" level of TIS-100, but this is horrendously inefficient. My cycle counts are at about twice the minimum possible according to the charts:
I'm not really as ...
3
votes
1answer
68 views
Implementation of a VertexBufferObject class
I have been working a simple 2D Game using C# language with OpenTK (OpenGL wrapper/binding for .NET). It uses a lot of sprites.
Since it uses lot of sprites, I think it's important to make everything ...
5
votes
2answers
155 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
33 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?
...
2
votes
1answer
78 views
Listing movies for torrenting
Can I get some help on shortening the amount of code I have in this program?
...
8
votes
3answers
92 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
68 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 ...
12
votes
2answers
99 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 ...
2
votes
0answers
37 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
172 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
63 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
37 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 ...
1
vote
1answer
42 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
45 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 ...
1
vote
1answer
45 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
48 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
58 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
50 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
16 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
69 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
353 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 ...
5
votes
1answer
53 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
57 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
2answers
73 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.
...