BigEd wrote:
I've just spotted you have a T800 transputer in there - excellent!
Back in 199X this was a dream of a machine. I once had two of them running but one is gone
In their Technical Application Handbook was an article about benchmarks. I found this remarkable technical note on the net:
Lies, damned lies and benchmarksBigEd wrote:
You just might be interested to try
pypy on the Pi - sometimes it gives a very impressive speed improvement.
I have used pypy with tremendous results. Whether the given numbers are already coming from using pypy I can't recall, but I think I would have mentioned that instead of referring to Python 3.4.2. The biggest problem this moment: I couldn't find my RasPi
Well, for all of you who are going to squeeze out every cycle and every bit of their machines: try to find the first gap that spans across 222. The numbers end with xxx969 and xxx747. The T800 took 11264,5781 seconds for that
(To be fair: the algorithm was slightly changed, and the program just start with some low number and continues to seek for larger and larger gaps):
Code:
PROC INMOS.ENTRY.POINT (CHAN OF ANY from.link, to.link)
-- DO NOT CHANGE PROCEDURE NAME, IT IS IMPORTANT.
#USE "\toolset\flibs" -- File server library
#USE "\toolset\realio" -- IO-conversions
PROC is.it.prim(VAL INT testnum, BOOL result)
VAL step IS 2:
VAL init IS 3:
INT i:
SEQ
i := init
WHILE (( (i TIMES i) < testnum) AND (( testnum REM i) <> 0))
i := i PLUS step
result := (testnum < (i TIMES i))
:
VAL Close.Option IS 0:
VAL f.ok IS 0:
INT result, screen.id, key.id:
SEQ
open.output.stream(from.link, to.link, 0, screen.id, result)
open.input.stream(from.link, to.link, 0, key.id, result)
IF
result = f.ok
[20]BYTE count.str:
INT len, loprim, hiprim, diff, lauf, time1, time2:
TIMER clock:
BOOL error,prim:
VAL step IS 2:
VAL limit IS ((MOSTPOS INT) >> 1):
SEQ
SEQ a = 0 FOR 20
count.str[a] := ' ' -- init count.string
write.block(from.link, to.link, screen.id,
"minimale Primzahldifferenz ? :", len, result)
result := f.ok - 1
WHILE result <> f.ok
read.block(from.link, to.link, key.id, 20, count.str, len, result)
STRINGTOINT(error, diff, [count.str FROM 0 FOR len])
clock ? time1
loprim := 3
hiprim := 7
WHILE (diff < 300)
SEQ
WHILE ((hiprim MINUS loprim) < diff)
SEQ
lauf := hiprim MINUS loprim
WHILE (lauf > 0)
SEQ
is.it.prim(loprim PLUS lauf,prim)
IF
prim
SEQ
loprim := lauf PLUS loprim
hiprim := loprim
lauf := 0
TRUE
lauf := lauf MINUS step
IF
hiprim = loprim
SEQ
hiprim := (loprim PLUS diff) MINUS step
TRUE
SEQ
lauf := step
hiprim := hiprim PLUS step
WHILE (lauf > 0)
SEQ
is.it.prim(hiprim,prim)
IF
prim
SEQ
lauf := 0
TRUE
hiprim := hiprim PLUS step
clock ? time2
SEQ a = 0 FOR 20
count.str[a] := ' ' -- init count.string
INTTOSTRING(len, count.str, hiprim)
write.block(from.link, to.link, screen.id,
count.str, len, result)
SEQ a = 0 FOR 20
count.str[a] := ' ' -- init count.string
INTTOSTRING(len, count.str, loprim)
write.block(from.link, to.link, screen.id,
count.str, len, result)
SEQ a = 0 FOR 20
count.str[a] := ' ' -- init count.string
INTTOSTRING(len, count.str, (hiprim-loprim))
write.block(from.link, to.link, screen.id,
[count.str FROM 0 FOR len], len, result)
time2 := time2 - time1
SEQ a = 0 FOR 20
count.str[a] := ' ' -- init count.string
REAL32TOSTRING(len, count.str,
(( REAL32 ROUND time2 ) / 15625.0 (REAL32)), 5, 5)
-- INTTOSTRING(len, count.str, time2)
write.block(from.link, to.link, screen.id,
[count.str FROM 0 FOR len], len, result)
write.block(from.link, to.link, screen.id,
" Sek. *N", len, result)
diff := (hiprim-loprim)+2
terminate.filer(from.link, to.link, result)
: