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
2answers
37 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 ...
1
vote
2answers
35 views

Summing all keys in the leaves of a tree

Input The input contains a single text line with eight positive integers A, B, M, L1, L2, L3, D, R separated by one or more spaces. These parameters regulate the ...
1
vote
0answers
16 views

Send Google Cloud Messages

I wrote code which is doing query and insert inside while loop. ...
1
vote
1answer
15 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
25 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
48 views

I need this simple code to run faster - C# [on hold]

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

3D Bin Packing using Java

This is a follow up question to 3D bin packing in Java ...
2
votes
2answers
26 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
31 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
48 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
50 views

Multithreaded AES encryption [on hold]

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
73 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
43 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
54 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
34 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
29 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
63 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
39 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
43 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

Printing future leap years

My code prints the next 20 leap years: ...
33
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
213 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
798 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
67 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
61 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
60 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
19 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
50 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? ...
1
vote
1answer
55 views

Permutations with repetitions algorithm in R

Given a string of length n, print all permutation of the given string. The code bellow generates all permutations (with repetitions) for the given string and stores them in object ...
1
vote
1answer
91 views

Parsing .PLY file using F#

I'm fairly new to F# and have written a program to parse PLY files - this is however done in an imperative way with mutable values and as far as I know that should be avoided in functional languages. ...
7
votes
2answers
88 views

Bucket sort in Haskell

As a first step in learning Haskell I am solving this problem, which involves finding the Rith-ranked numbers, given some input list and many Ri. In an imperative language I would make a zeroed array ...
4
votes
2answers
268 views

Find prime positioned prime number

This is a question from programming contest. This contest is already over. Now, all the prime numbers are arranged sequentially in ascending order. i.e:- 2, 3, 5,7...and so on. Now, your task is to ...
4
votes
2answers
84 views

Project Euler #23 Non-abundant sums

I'm having trouble optimizing the Project Euler problem number 23 : A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of ...
1
vote
0answers
44 views

Transforming a parts catalog into a different data structure

The entire purpose of this code is to arrange the data that was dumped into CommRef_ into the required structure of ResObj. The ...
5
votes
2answers
65 views

Calculating the perfect squares between two given numbers

This code is for calculating the perfect squares between two given numbers. User can add the interval as well like for how many intervals he want to check the perfect squares. For example if user ...
1
vote
1answer
93 views

Getting price for one firm by week

I've a lot of data whit prices of a product from different firms by week. I've a class named WeekPrice witch contains a list of ...
2
votes
2answers
72 views
2
votes
1answer
44 views

3D bin packing in Java

I made some changes to the first code here I wrote and I want to know which one is more correct logically (before the changes or after the changes). It's really hard to manually test these kind of ...
1
vote
0answers
27 views

Caching calculation results in R

Here is what I came to for calculation result caching/invalidating. What do you think? How to use: ...
2
votes
0answers
43 views

UDP server for a multiplayer game using socketserver

I am making a multiplayer platforming game, and currently there are server performance issues once I have about 7+ clients connected. I was told earlier last week that I should investigate ...
3
votes
1answer
39 views

3D bin packing algorithm using Java?

I wrote a 3D bin packing algorithm but I am still not sure if it is correct or not. I did not follow any code or pseudo-code that's why I would like to know if it is an efficient algorithm for the 3D ...
2
votes
2answers
79 views

Integer to English challenge

I have a challenge, which is to create a JavaScript function that turns a given number into the string representation. For example: console.log(inToEnglish(15)) ...
1
vote
2answers
29 views

Checking literary works for Zipf's Law

I wrote a Python script that, given a literary work in text file format, takes it apart, makes a word list, counts how many times each words appears in the literary work, and then checks if it follows ...