Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.
0
votes
5answers
54 views
Finding dice roll results in a combinable list of numbers
This code takes a selection of numbers between 1 to 9 which could be 1,2,3,4,5,6,7,8,9 or 1,2,4 or ...
2
votes
1answer
47 views
SE-like voting system
I've created a voting system that's similar to Stack Exchange's in a Ruby on Rails web app. It's working great - as far as I can tell, all the edge cases are caught. This is the action to cast a vote. ...
1
vote
0answers
29 views
PHP Lottery Simulator
I have a lottery simulator on my website that simulates you playing the lottery every week until your death and tells you how much you would have won or lost. It can take a custom number of balls and ...
0
votes
0answers
33 views
Checking if a number can be made from a group of numbers [on hold]
This code is used to check if a number between 1 and 12 can be found in OR made from a group of numbers which can be any combination between 1 and 9. For example, if the number to be found is 7, can ...
5
votes
1answer
61 views
Computing the total different between a pixel and its neighborhood
I have C++ code which written for mex in MATLAB. It used to compute the total different between a pixel and its neighborhood (8 neighborhood in my code). The code ran and gave me an expected result. ...
1
vote
1answer
14 views
Copy Data from Informix to SQL Server
The following method copies data from Informix db to SQL Server db and it's so slow, I want to refactor it so it could be more readable and faster:
...
3
votes
3answers
486 views
Finding the candidate with the majority of ballots
I am doing a code wars problem and so far I have managed to loop through a collection to find the "winner" (defined by the String that appears more than ...
5
votes
1answer
31 views
Python Octree Implementation
I'm working with 3D point clouds stored in Numpy arrays. I'd succesfully used the scipy's KDTree implementation for task like k-neighbors search and outlier filtering.
However I wanted to try the ...
3
votes
0answers
34 views
Inserting nodes into a trie data structure
I have a recursive algorithm that inserts nodes into a trie data structure but it seems to be running not well and takes over 10 mins to complete on a data set of about 1 million. All nodes contain a ...
3
votes
0answers
35 views
Computing intersection of 2D infinite lines
I wrote a small program to compute intersection of 2D infinite lines using Boost Geometry
A line is defined by two points in Line class. The ...
3
votes
1answer
49 views
How to make doubly linked list design more efficient?
I have played recently and implemented doubly linked list with merge sort algorithm. I was wondering if there is any way of improving the algorithm further to make it as fast as possible (I know about ...
1
vote
0answers
37 views
Multiple Persons enter room simultaneously and exits after specific interval of time
Here is the link to git repo of my application I am currently implementing just to have better understanding of OOP as well as learning Concurrency (Atleast a try :D)
What is the whole ...
2
votes
1answer
55 views
Parsing in between of brackets
I do parsing of the string in order to find wrapped sub-string inside brackets of the first level. a+(b+(d-g))+g+d, in this case I will need to separate ...
1
vote
2answers
38 views
Permute and count between nested dictionaries
Goal:
Permute inner values between two dictionaries with matching outer key,
Save permuatations in counter,
Move to next outer key, update counter with new permutations.
Problem:
Many lookups on ...
1
vote
2answers
85 views
Iterating over thousands of objects to generate html
Currently I am working on a profiling unit that does not require stack traces to preserve the call stack, and can return the performance in a html format.
All though the logging in itself is fairly ...
0
votes
2answers
50 views
Write into the same CSV file multiple times
I implemented an OutputWriterService.class to write content in the same file multiple times.
The writeToCsvFile method is ...
0
votes
2answers
60 views
Summing all keys in the leaves of a tree
My program takes 35 sec to run example 2. How can I make my program faster?
...
1
vote
0answers
19 views
1
vote
1answer
17 views
Mapping discussion entries from an SQL-View to objects
In my ASPNET MVC application, I am loading Discussion Entry records along with User info (who posted the entry), Badges (assigned to the entry), Reactions (made to the entry like facebook-style ...
2
votes
0answers
29 views
Altermate to CURSOR - SQL
I am currently using an iterator because I have to insert record in one table, get its primary key and add it to another table. But since it's a loop, it's very slow when data is very big.
...
-4
votes
0answers
53 views
I need this simple code to run faster - C# [closed]
Ok, so I have to make an program that will make integer array better quality (the quality is determined by it's smallest variable). I have been given a amount of consecutive elements that I can ...
0
votes
0answers
56 views
3
votes
2answers
28 views
Fetch records that do not get matched in another table
I'm trying to fetch records from table PaymentToken if its AccountNumber matched but ...
2
votes
0answers
32 views
Visualizing Newton-Raphson method for finding zeroes of a function
I have created a program to visualize the working of Newton-Raphson method to find the zeroes of a function:
newton.m:
...
3
votes
2answers
49 views
Optimization of program to find string duplicates
This is my first post here, I'm looking for ways to optimize a program in C++ I wrote to count all the duplicates in a string and print the duplicated letters and the number of times my program takes ...
-4
votes
1answer
54 views
Multithreaded AES encryption [closed]
I am trying to implement Lowering speed on my hybride encryption function for large files but can't seems to successfully bug fix a few issues.
How do I deal with the while loop in this ...
2
votes
2answers
91 views
Simulation of 2D elastic balls
Following this SO post and this Wikipedia article, I wrote a Python script to simulate physics of 2D elastic balls.
I define the physical behaviour of each ball in the ...
2
votes
1answer
44 views
Get all objects which contains any given array of Enums
What this does?:
Interactions is an Enum whereas Interactable is an interface (not @Functional Interface). Every ...
5
votes
1answer
56 views
Stack implementation using a growing array
I'm working through Sedgewick's Algorithms book for fun and educational purposes. I am implementing a simple Stack<T>, using ...
4
votes
0answers
40 views
Delete engine for deeply nested linked structure
The background is the question at http://stackoverflow.com/questions/36634394/nested-shared-ptr-destruction-causes-stack-overflow. To summarize, for a data structure that looks like:
...
-3
votes
1answer
30 views
this procedure basically gets a sentence of the user and the splits it up into its position values and writes them to a file
this program does work entirely without any errors appearing however I would like to shorten it down to make it more reliable and neat
...
7
votes
1answer
64 views
Complete factorization in ><>
Maybe a somewhat odd choice of language, but here is a program in ><> I have tried
to optimize the execution time of. (Not golfing). The efficiency is measured in the number of required ...
3
votes
1answer
60 views
Lowering speed on my hybride encryption function for large files
I have an assignment to encrypt files (+- 1 gb) and speed is an important factor. I am also kinda forced to the C# language since nobody in my group knows C++. The time now recorded for 100 mb is 12 ...
6
votes
0answers
40 views
Data marshaling wrapper for a TCP server
After a lot of research, I created this wrapper which I think fits very well to my needs. My project is a TCP server and I will be using this wrapper every time the server receives a packet. ...
3
votes
0answers
44 views
Analysis of TV station preferences for various demographic groups
I have a notebook here which details my code and may be more legible.
I worked on a project that flattens a table that initially looked like this (this is table1):
...
3
votes
1answer
27 views
Optimizing jQuery list filtering
Scenario
Currently filtering through a list of ~3100 rows of data presented to the end-user in the form of an index (think, list of car models).
This is done in such a way that every item is ...
1
vote
3answers
135 views
Project Euler #43
I'm having trouble optimizing the Project Euler problem #43 :
The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also ...
3
votes
2answers
101 views
Project Euler Problem #41
I recently finished the project Euler problem # 41 :
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit ...
7
votes
8answers
1k views
34
votes
3answers
3k views
Benchmarking things in C#
I needed a better way to benchmark code, because, well, rewriting the same benchmarking code every time I need it is just...well...unpleasant.
So, here's a class which does just that, it runs an ...
2
votes
3answers
215 views
Project Euler #34 Digit factorials
I'm having trouble improving the performance of the solution to the Project Euler problem #34
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which ...
4
votes
2answers
85 views
Optimize the CSV Upload function in Ruby On Rails
The code is working fine however, I would like to fix code after unless and can I store thread ID in the database too? Is there a way to improve performance?
...
10
votes
5answers
807 views
Finding two consecutive triangular numbers with a given target sum
I need to speed up this code so it can handle inputs in the thousands. It adds triangular numbers to a list based on input n, then it loops through to find if any two consecutive numbers squared in ...
3
votes
1answer
68 views
Tic Tac Toe with 3 AI modes or Two-Player
This is my first stab at a game AI, and I've been working on multiple game mode difficulties, so I decided to start with a simple game. :) I'm most concerned about efficiency of the AI algorithms, and ...
1
vote
1answer
64 views
Checking whether a game board is full
I have a method in Scala that checks if a game board is full or not. To speed this method up, I return inside the nested for loop to break out of both of them and stop execution. How would I achieve ...
3
votes
1answer
64 views
Find position of a word in a list in Python
The aim of this program is to say which position a word is in a list. This is just a basic version of it. I made to see if I could shorten it more than what it is currently.
...
-1
votes
0answers
31 views
Dynamic boostrap dashboard
I am creating dynamic dashboard, where each column of row will be considered a screen. The system picks various screens as an array that is formatted as follows:
...
1
vote
0answers
27 views
Gulp file for Jade, SASS, Optimize-html, jekyll and more
I have the following gulpfile which I use for development. It used to be a simple gulpfile with just jade compiling, sass, jekyll-rebuild, etc. but then I decided to add HTML Optimization my gulpfile ...
0
votes
1answer
48 views
Triple for loop for a data set
I am writing a triple for loop in Python. Since the data set is larger, it takes more than 1.5 hours to finish. Is there any fast way to avoid the loop?
...
-1
votes
2answers
57 views
Maths quiz with difficulty levels and a score database
How can I make the saving to the dictionaries more efficient as well as making my overall code more efficient?
...