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 34470

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

4 votes

Find duplicates in List where all the numbers in between is <= than the duplicates

If your numbers are random then the probability for any number to be larger than it's predecessor is about 50%. In that case your original solution is already pretty much as fast as possible as long a …
Tesseract's user avatar
  • 380
1 vote

Rhythmic task controller

You could remove all elements from the queue and then offer them back if necessary. public void run() { ArrayList<Task> tasks = new ArrayList<>(); { Task task; while((task = queue …
Tesseract's user avatar
  • 380
1 vote

How can I make my isSorted function faster?

Amon's solution is simple and functional but it doesn't work on arrays and other IndexedSeqs. If you want a general isSorted method that works on any sequential datastructure and is very fast you need …
Tesseract's user avatar
  • 380