BYTE was pretty keen on the sieve as a benchmark back in the 80s! Always just a single buffer though.
As it's evolved, this thread has come to investigate more than one kind of thing... it could arguably be two or even three threads by now. On this forum, that only happens when a poster sees fit to start a new thread, when they realise they have a new idea - the mods don't rearrange threads.
The question for a benchmark really is what approximates an application, and that's something which varies according to the use. Is Basic to be used more like Fortran or more like Cobol? The question for an interesting programming exercise is different!
For the prime-gaps benchmark as tabulated at the top of the thread, at minimum, we're either going to be benchmarking division (or modulus) or array accesses - possibly both. In the earlier revisions, we're also benchmarking square root, or multiplication, or both.
In interpreted languages we're benchmarking the interpreter, and in versions which use GOTO we're also benchmarking that.
I quite like the use of integer variables (but again there's a choice - one might want to be benchmarking the floating point)
I have got one contribution which is a cheap speedup of one of the early versions: it's like a poor man's wheel.
Code:
1 REM Basic-Bench la SYM etc.
2 REM *** Integerversion + Modulofunktion ***
10 Z% = 3: INPUT A%,B%
15 TIME = 0
20 FOR C% = 5 TO A% STEP 2
25 IF C% MOD 3 = 0 THEN C%=C%+2
30 FOR D% = 5 TO SQR(C%) STEP 2
40 IF C% MOD D% = 0 THEN 80
50 NEXT D%
60 IF C%-Z% >= B% THEN PRINT C%,Z%,C%-Z%: PRINT TIME: GOTO 10
70 Z% = C%
80 NEXT C%
90 PRINT "keine Lsung gefunden !": GOTO 10
I'm quite interested to roll my sleeves up and try our OPC CPUs with (some version of) this benchmark, but I haven't got to it. To have any kind of useful comparison you surely need to be coding the same algorithm with the same optimisations, except where one CPU has to do something by hand which another can do with an instruction. For me, comparing CPUs is interesting, taking care to normalise to memory performance or similar.