Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with performance
Search options answers only
not deleted
user 54734
Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.
15
votes
Finding two consecutive triangular numbers with a given target sum
Performance
You can find the solution without any loops:
The xth triangle number is given by:
$$\frac{x(x+1)}{2}$$
So the sum n of the square of two consecutive triangular numbers is given by:
$$\ …
6
votes
Optimizing Pi Estimation Code
You can calculate Pi using numerical integration of the circular arc-segment centred at (0,0), from the point (radius, 0) to (radius/sqrt(2), radius/sqrt(2)) (the green area on your diagram).
To do th …
4
votes
Project Euler #7 10001st prime
Performance
I can't think of anything to make it work faster
You can use a Sieve of Eratosthenes to make it faster - here is some sample code (sieving only odd numbers) that I had written in Java …
3
votes
Accepted
Project Euler 127 - abc-hits
Given that: \$GCD(a,b)=GCD(a,c)=GCD(b,c)=1\$
Since \$a\$, \$b\$ and \$c\$ have no common divisors then it also follows that: \$GCD(rad(a),rad(b))=GCD(rad(a),rad(c))=GCD(rad(b),rad(c))=1\$
And: \$rad(a …