Questions tagged [performance]

Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.

Filter by
Sorted by
Tagged with
1
vote
0answers
343 views

Drawing a snake using arrow keys in Excel using VBA

Since a few days I am trying to make a simple snake game with VBA. So far, I have a moving square, that listens to the arrow commands of the keyboard. (Press Home to break it). Something like this: ...
1
vote
3answers
67 views

Mixed Duo String Generator 2 [duplicate]

I've create a program that finds mixed duo within a string. It removes characters from a string that do not form the first mixed duo. It does not rearrange the order of the string, it ony remove ...
1
vote
2answers
277 views

Massive file sorting algorithm

I was trying to sort a massive file of successive chars in C. I did some research and found a few file sorting algorithms that look the same. Their main idea is to read an amount of data to memory, ...
1
vote
1answer
50 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. ...
1
vote
2answers
148 views

Speeding up prime factorization

I have written the following code for returning the list of prime factors. Any speed-enhancing suggestions? ...
1
vote
3answers
1k views

Lowest common ancestor in recursive tree traversal

LCA = Lowest Common Ancestor The following code finds the lowest common ancestor in tree of nodes, where a node can have two parents, left and right. The tree looks like this: ...
1
vote
2answers
90 views

Tab month tracker

The code works; the problem is in the processing. I feel like the code can further improved and I believe the answer is Arrays however, my knowledge is very limited. Here, I loop through ~ 1000 ...
1
vote
1answer
3k views

Convert seconds to hours, minutes and seconds

My logic is as follow: Convert actual time to minutes. Extract seconds from minutes (30:04 -> 4 seconds). Subtract seconds value from minutes (step1-step2) to get time only in seconds. Convert time ...
0
votes
1answer
387 views

Directory that lists employee information

I'm working on a directory that lists employee information. Each employee can belong to multiple departments and each employee can have multiple job titles. I have 5 MySQL tables that I am pulling ...
0
votes
2answers
155 views

Calculating shortest possible route between two given nodes

I recently came across this problem: Heroes in Indian movies are capable of superhuman feats. For example, they can jump between buildings, jump onto and from running trains, catch bullets with ...
0
votes
3answers
218 views

Check browser compatibility for RequestAnimationFrame and Vanilla JavaScript .animate() API

I'm trying to set up some code to first test if the Vanilla JavaScript .animate() API is Supported, then if it's not check if ...
0
votes
1answer
424 views

Finding the Minimum and Maximum Value in an Image

Given an image which is padded to support aligning (SSE) I need to find its minimum and maximum value as fast as possible. Mind you the padded values are not defined and can't be assumed to have ...
0
votes
1answer
80 views

R Function to Generate Predictions from Ratings and Save Results

I am trying to generate predictions using the function below in combination with sapply. My actual datasets are very large, I am attempting to make 1.5 million predictions with this function and it is ...
0
votes
1answer
129 views

Validation on two different classes and passing one object including everything to another class

I have two consumers and each consumer has their own validation logic entirely different from one other so I am using two validator class for that, one for each other. ...
-1
votes
3answers
198 views

Better sorting speed

import sys x=int(sys.stdin.readline()) lst = [int(sys.stdin.readline()) for i in xrange(x)] lst.sort() print lst How can I make this code faster for large ...
-1
votes
1answer
186 views

Huge performance difference: PowerShell Core vs. 5.1 [closed]

Recently I have answered another question about performance. A solution found using PowerShell-ISE successfully, and good speed testified using PowerShell Core. However, running the same script(s) in ...
-1
votes
2answers
379 views

QuadTree can't handle many elements

I'm currently implementing my own QuadTree in C++. It runs well with 100 items, but once you start adding more it slows down. remove, ...
-2
votes
1answer
651 views

Project Euler # 50 Consecutive prime sum in Python

The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest sum ...
-3
votes
2answers
366 views

Converting Array of `Float32` (`float`) to Array of `UINT8` (`unsigned char`) Using AVX2 [closed]

Given input array of Float32 (float) with numElements how could one efficiently convert it ...

1
8 9 10 11
12