# Questions tagged [fastest-code]

The winner of a fastest-code challenge is determined by the runtime performance of the submissions. For fairness, all submissions should be benchmarked on the same machine, which usually means all submissions have to be tested by the host of the challenge. Alternatively, the submission can be compared to a reference program. For scoring by asymptotic time complexity, use [fastest-algorithm] instead.

207 questions
Filter by
Sorted by
Tagged with
319k views

### High throughput Fizz Buzz

Fizz Buzz is a common challenge given during interviews. The challenge goes something like this: Write a program that prints the numbers from 1 to n. If a number is divisible by 3, write Fizz instead....
• 2,627
112k views

### How slow is Python really? (Or how fast is your language?)

I have this code which I have written in Python/NumPy ...
15k views

### Calculate the number of primes up to n

π(n) is the number of primes less than or equal to n. Input: a natural number, n. Output: π(n). Scoring: This is a fastest-code challenge. Score will be the sum of times for the score cases. I ...
• 3,215
12k views

### Fastest way to sort a big array of Gaussian-distributed data

Following the interest in this question, I thought it would be interesting to make answers a bit more objective and quantitative by proposing a contest. The idea is simple: I have generated a binary ...
• 713
20k views

### How Slow Is Python Really (Part II)?

This is a follow up to How slow is Python really? (Or how fast is your language?). It turns out it was a bit too easy to get a x100 speedup for my last question. For those who have enjoyed the ...
2k views

### Extending OEIS: Counting Diamond Tilings

I promise, this will be my last challenge about diamong tilings (for a while, anyway). On the bright side, this challenge doesn't have anything to do with ASCII art, and is not a code golf either, so ...
• 197k
4k views

### Help Indiana Jones to get the treasure

Story Indiana Jones was exploring a cave where a precious treasure is located. Suddenly, an earthquake happened. When the earthquake ended, he noticed that some rocks that had fallen from the ...
• 3,452
2k views

### Topologically distinct ways of dissecting a square into rectangles

I was asked by OEIS contributor Andrew Howroyd to post a Code Golf Challenge to extend OEIS sequence A049021. Would be super great to get a couple more terms for [...] A049021. Kind of thing [...] ...
• 8,689
9k views

### Bentley's coding challenge: k most frequent words

This is perhaps one of the classical coding challenges that got some resonance in 1986, when columnist Jon Bentley asked Donald Knuth to write a program that would find k most frequent words in a file....
6k views

### Find the largest prime whose length, sum and product is prime

The number 113 is the first prime whose length 3 is prime, digital sum 5 = 1 + 1 + 3 is ...
• 89.8k