Skip to main content
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
Search options not deleted user 20273

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

2 votes

Improve performance Javascript function

This is not really a speed issue; there are a couple of problems with your code that prevent it from working properly. The most serious problem is that, if the position is not good you set isok2 = fa …
Stuart's user avatar
  • 2,800
3 votes

Simple GCF calculator app

You can use sets to whittle down the possible GCFs. for i, argument in enumerate(sys.argv[1:]): factors = set(n for n in range(2, int(argument) + 1) if int(argument) & n is 0) print argument, …
Stuart's user avatar
  • 2,800
0 votes

Calendar code review

You are storing loads of information in the class names and as data in the DOM which is ultimately making everything a lot more complicated. A better approach would be to store it in an object. But al …
Stuart's user avatar
  • 2,800
3 votes

"Find the Min" challenge on Facebook Hacker Cup

Untested, but using Counter from collections may be quicker than forming a set of the last k values each time. counter = collections.Counter(m) for j in xrange(n - k): i = 0 while counter[i]: …
Stuart's user avatar
  • 2,800
3 votes

Getting the unique factors of a number recursively

Focusing on refactoring of your current idea rather than making any radical changes, you could: note that we are only interested in divisors which are less than or equal to the predivisor, and adjus …
Stuart's user avatar
  • 2,800