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.
8,845 questions
3
votes
2
answers
176
views
firstNonNull implementations
Between the two implementations, which one is better?
...
3
votes
0
answers
119
views
Efficient Boolean Functions in R
I am developing a package with an R6 class, which operates recursively on a logical matrix. In order to repeatedly check constraints on this matrix, I must ...
14
votes
3
answers
956
views
Arbitrary precision calculator for π in Python using only integer arithmetic
Yesterday was π-day (or today is π-day depending on your timezone). Anyway I spent the past month or so implementing trigonometric functions using only integer arithmetic, and I have implemented five ...
3
votes
2
answers
153
views
War of dots (client): A simple RTS war game in python
Follow up question for War of dots: simple RTS war game in python. Code here, extra stuff here (screenshots, profiles, documentation). Server is being reviewed here.
What's changed?
Since last code ...
7
votes
3
answers
850
views
War of dots (server): A simple RTS war game in python
Follow up question for War of dots: simple RTS war game in python. Code here, extra stuff here (screenshots, profiles, documentation). Client is being reviewed here.
What's changed?
Since last code ...
5
votes
1
answer
180
views
Romberg integration using integer arithmetic - without using Romberg's method
This is related to my previous question.
This is what I have been working on in the past month.
The title says it all, I have implemented numerical integration using integer arithmetic and Romberg ...
6
votes
4
answers
587
views
Numerical integration via Newton-Cotes formulas using integer arithmetic
I have written a Numerical integration library in Python from scratch using Newton-Cotes formulas and integer arithmetic, as a self-imposed programming challenge. I wrote all the code completely by ...
7
votes
4
answers
1k
views
Python fraction class
I have been using basic algebra to calculate many things using only integer arithmetic by separating the parts. Like \$(a + b \sqrt{N})(c + d \sqrt{N}) = (ac + Nbd) + (ad + bc)\sqrt{N}\$, and \$(a + ...
9
votes
2
answers
459
views
A Python generator for reduced fractions in the interval [0, 1] with 1/D spacing
The problem I was trying to solve is simple, given an integer, find all fractions with the denominator being the input and numerator in range(0, denominator+1) and ...
1
vote
1
answer
70
views
Concurrent parallel addition function
I have created a concurrent parallel addition function in Ada using Ada tasks and Rendevous.
How can this function be made more efficient or simpler?
...
2
votes
1
answer
72
views
Find the first element in an array matching a specified value
How should the following example be improved? This is an example of the SPARK subset of Ada. SPARK is both a programming language and a set of formal verification tools.
This example defines a ...
10
votes
6
answers
1k
views
Formatting dates to YYYY/MM/DD
The 'CS50 Introduction to Programming with Python' course allows you to check that your code can pass various tests before submitting your work, providing a green smiley face for each pass.
Currently, ...
4
votes
0
answers
71
views
Verifying the least prime factor of large numbers with trial division in Rust
intro
I'm trying to find the least prime factor of numbers, and I do not want it to be probabilistic.
For example, take 21149299 = 19 * 101 * 11021, where 19 and ...
8
votes
4
answers
1k
views
War of dots: simple RTS war game in python
DISCLAIMER: All credit goes to the original War of dots.
Github link
Has profiles, executables (a pre release) and more screenshots.
Backstory:
I used to play risk when I was a kid, but I always had ...
5
votes
2
answers
404
views
Image Perspective Transformation with CUDA in C++
This is a follow-up question for Image Stitching using SIFT Keypoint Descriptor in C++ and SIFT Keypoint Detection for Image in C++. In the previous post, the image stitching algorithm is implemented; ...