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

0
votes
0answers
3 views

Faster copying of images to change their PixelFormat

I have the following code below that creates a new Bitmap object the same as the original but to ensure that its 'PixelFormat is ...
2
votes
2answers
210 views

ToDo List Program Efficiency

I created a simple todo list program in C++ with the ability to store multiple lists, and add and delete list elements. I'm looking for suggestions on how to make it more efficient, obvious ...
4
votes
2answers
35 views

Counting from 0 to a number and back to zero, and space-padding the result to be a given length

I completed a task: The objective was to create a method with 2 arguments: a number to count to, and how many char/numbers in the resulting string. Result: Let's say that "number" is 5, so it will ...
4
votes
4answers
226 views

Data type detection for a CSV file parser

I am building a CSV file parser, and in order to get the appropriate Object to represent different data types found on the parsed files, I wrote the following function: ...
-3
votes
0answers
29 views

Variable s gives me a negative number [on hold]

It's the second Euler project ...
0
votes
0answers
21 views

Pangram test with non-ASCII characters [on hold]

Pangram Determine if a sentence is a pangram. Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the ...
4
votes
1answer
47 views

SQL query that flattens many-to-one relationships

I have a database with these tables, where each mapping table represents a "many-to-one" relationship between the table on the right and the table on the left (click to enlarge): I am selecting a ...
2
votes
1answer
40 views

Import data module

I have a custom module to import nodes from a .txt file. (Drupal 7). My problem is I have a lot of nodes to import and this function takes so much time. ...
2
votes
1answer
43 views

Performance optimization when switching from nested to flat representation (genetic algorithm)

The code below is the core of a Genetic Algorithm (NSGA-II to be precise, without crowding-distance calculation), but I've taken out all the GA-specific parts and made a generic example. I think I've ...
2
votes
0answers
55 views
+50

Make Depth First Search program more efficient

This is a problem from programming contest. In the first line there is one integer T denoting the number of test cases. Description of T test cases follow. Each one have two integers N and K ...
3
votes
1answer
92 views

Runtime compiler performance

I've been playing about with runtime compilation to allow me to get/set runtime property values in C# and so far I have come up with a class. This allows me to write code like the following which ...
-3
votes
0answers
54 views

Speeding up code (beginner) [on hold]

So I've written some code that I'm sure can be done quicker and more effectively on my micro, but I just can't my head around it. (using TM4C1294xl in CCS) I have an interrupt which I want to read the ...
4
votes
3answers
128 views

Count words in a string

Continuing my TDD from exercism. Write a program that given a phrase can count the occurrences of each word in that phrase. For example for the input ...
3
votes
0answers
21 views

Rolling OLS algorithm in a dataframe

I want to be able to find a solution to run the following code in a much faster fashion (ideally something like dataframe.apply(func) which has the fastest speed, ...
-2
votes
5answers
112 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
58 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. ...
2
votes
0answers
37 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
35 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
67 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
2answers
47 views
+50

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
512 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
48 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
36 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
36 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
50 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
38 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
57 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
41 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
87 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
51 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
62 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

Send Google Cloud Messages

I wrote code which is doing query and insert inside while loop. ...
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. ...
0
votes
0answers
56 views

3D Bin Packing using Java

This is a follow up question to 3D bin packing in Java ...
3
votes
2answers
29 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
37 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
50 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
57 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
95 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
57 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
41 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
65 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
42 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
28 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
136 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 ...