Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
Kaz:
Pisanie o sobie w trzeciej osobie to czesty zwyczaj przedstawiania swoich osiagniec. Szczegolnie Ci, ktorzy maja do czynienia z mediami stosuja taka stylistyke swoich CV/profili, etc.Tajemnice Atari 92/2:
Widać wielką zaletę Odwrotnej Notacji Polskiej, a mianowicie brak nawiasów wymuszających pierwszeństwo dla danego działania. Wszystkie działania w języku FORTH są wykonywane zawsze w kolejności zapisu. Czytelnikom proponowałbym spróbować swych sił w następującym przykładzie:2 3 + 1 2 * + 2 3 * 1 + + ok
(1+2*3)+(1+2)*(2+3) = (1+6) + 3*5 = 7 + 15 = 22
2 3 + 1 2 + * 2 3 * 1 + +
(2+3)*(1+2)+(2*3)+1 = 5*3+6+1 = 15+6+1 = 22
2 3 + 1 2 + * 2 3 * + 1 + => (5 * 3) + (6 + 1)
mono:
poprawny wynik uzyskujesz przez przypadek(1+2*3)+(1+2)*(2+3) <=> (2+3)*(1+2)+(2*3)+1
(2+3)*(1+2) = (1+2)*(2+3) = 15
(1+2*3) = (2*3)+1 = 7
Mad Pascal YoshPlus: 35572 iterations in 100 ticks
Action! YoshPlus: 33239 iterations in 100 ticks
Quick 1.6 YoshPlus: 16242 iterations in 100 ticks
DurexForth C64 YoshPLus: 1526 iterations in 100 ticks
Fast Basic 4.0 Int YoshPlus: 1458 iterations in 100 ticks
fig-Forth 1.1 YoshPlus: 715 iterations in 100 ticks
CLSN Pascal YoshPlus: 487 iterations in 100 ticks
\ Sieve Benchmark
8192 CONSTANT SIZE
0 VARIABLE FLAGS
0 FLAGS !
SIZE ALLOT
: DO-PRIME
FLAGS SIZE 1 FILL ( set array )
0 ( 0 COUNT ) SIZE 0
DO FLAGS I + C@
IF I DUP + 3 + DUP I +
BEGIN DUP SIZE <
WHILE 0 OVER FLAGS + C! OVER + REPEAT
DROP DROP 1+
THEN
LOOP
CC65 YoshPlus: 41844 iterations in 100 ticks
Mad Pascal YoshPlus: 35572 iterations in 100 ticks
Action! YoshPlus: 33239 iterations in 100 ticks
Quick 2.2 YoshPlus: 21320 iterations in 100 ticks
Quick 1.6 YoshPlus: 16242 iterations in 100 ticks
PL65 YoshPlus: 4708 iterations in 100 ticks
FastBasic FBI YoshPlus: 2427 iterations in 100 ticks
fig-Forth 1.1 YoshPlus: 715 iterations in 100 ticks
CLSN Pascal YoshPlus: 487 iterations in 100 ticks
CC65 Chessboard: 76 iterations in 150 ticks
Mad Pascal Chessboard: 40 iterations in 150 ticks
Action! Chessboard: 35 iterations in 150 ticks
Quick 2.2 Chessboard: 27 iterations in 150 ticks
Quick 1.6 Chessboard: 16 iterations in 150 ticks
PL65 Chessboard: 12 iterations in 150 ticks
MADS (opt) SIEVE: 440 ticks in 10 iterations
CC65 (opt) SIEVE: 602 ticks in 10 iterations
Mad Pascal (opt) SIEVE: 644 ticks in 10 iterations
Mad Pascal SIEVE: 739 ticks in 10 iterations
Action! SIEVE: 1003 ticks in 10 iterations
Advan BASIC (opt) SIEVE: 1050 ticks in 10 iterations
Quick 1.6 SIEVE: 2022 ticks in 10 iterations
Quick 2.2 SIEVE: 2199 ticks in 10 iterations
PL65 SIEVE: 3853 ticks in 10 iterations
FastBasic FBI SIEVE: 6312 ticks in 10 iterations
Advan BASIC SIEVE: 6800 ticks in 10 iterations
fig-Forth 1.1 SIEVE: 8482 ticks in 10 iterations
Turbo-BASIC XL [C] SIEVE: 16880 ticks in 10 iterations
Turbo-BASIC XL SIEVE: 46060 ticks in 10 iterations
BASIC SIEVE: 133960 ticks in 10 iterations
( ** YOSH ** )
( loop - 2 seconds, no vars )
COLD
: YOSH ( -- n )
0 20 !
0
BEGIN
100 20 @ > WHILE 1+
REPEAT ;
YOSH .
( 2386 on APX Forth )
( 2330 on Antic Forth )
( 4255 on Val Forth )
( ** YOSH PLUS ** )
( v2, with variables )
COLD
0 VARIABLE VAR-I
0 VARIABLE VAR-A
0 VARIABLE VAR-B
: YOSHP2 ( -- n )
0 VAR-I ! 0 VAR-A ! 0 VAR-B !
0 20 ! BEGIN
20 @ 100 < WHILE
1 VAR-A +! VAR-A @ VAR-B !
1 VAR-B +! VAR-B @ VAR-A !
1 VAR-I +!
REPEAT ;
YOSHP2 VAR-I ?
( 1261 on APX Forth )
( 1289 on Val Forth )
( ** YOSH PLUS ** )
( v3, stack fun )
: YOSHP3 ( -- )
0 20 !
0 0 0
BEGIN
20 @ 100 < WHILE
1+ >R DROP 1+ DUP
1+ SWAP DROP DUP
R>
REPEAT ;
YOSHP3 .
( 1310 on APX Forth )
( 1289 on Antic Forth )
( 2141 on Val Forth )
CC65 YoshPlus: 41844 iterations in 100 ticks
llvm-mos -O1 YoshPlus: 41718 iterations in 100 ticks
Mad Pascal YoshPlus: 35572 iterations in 100 ticks
Action! YoshPlus: 33239 iterations in 100 ticks
Quick 2.2 YoshPlus: 21320 iterations in 100 ticks
Quick 1.6 YoshPlus: 16242 iterations in 100 ticks
PL65 YoshPlus: 4708 iterations in 100 ticks
FastBasic FBI YoshPlus: 2427 iterations in 100 ticks
fig-Forth 1.1 YoshPlus: 715 iterations in 100 ticks
CLSN Pascal YoshPlus: 487 iterations in 100 ticks
llvm-mos -O3 Chessboard: 154(!) iterations in 150 ticks
CC65 Chessboard: 76 iterations in 150 ticks
Mad Pascal Chessboard: 40 iterations in 150 ticks
Action! Chessboard: 35 iterations in 150 ticks
Quick 2.2 Chessboard: 27 iterations in 150 ticks
Quick 1.6 Chessboard: 16 iterations in 150 ticks
PL65 Chessboard: 12 iterations in 150 ticks
MADS (opt) SIEVE: 440 ticks in 10 iterations
CC65 (opt) SIEVE: 602 ticks in 10 iterations
Mad Pascal (opt) SIEVE: 644 ticks in 10 iterations
Mad Pascal SIEVE: 739 ticks in 10 iterations
llvm-mos -O3 SIEVE: 927 ticks in 10 iterations
Action! SIEVE: 1003 ticks in 10 iterations
Advan BASIC (opt) SIEVE: 1050 ticks in 10 iterations
Quick 1.6 SIEVE: 2022 ticks in 10 iterations
Quick 2.2 SIEVE: 2199 ticks in 10 iterations
PL65 SIEVE: 3853 ticks in 10 iterations
FastBasic FBI SIEVE: 6312 ticks in 10 iterations
Advan BASIC SIEVE: 6800 ticks in 10 iterations
fig-Forth 1.1 SIEVE: 8482 ticks in 10 iterations
Turbo-BASIC XL [C] SIEVE: 16880 ticks in 10 iterations
Turbo-BASIC XL SIEVE: 46060 ticks in 10 iterations
BASIC SIEVE: 133960 ticks in 10 iterations
Mad Pascal YoshPlus: 41933 iterations in 100 ticks
Mad Pascal Chessboard: 88 iterations in 150 ticks
Mad Pascal (opt) SIEVE: 577 ticks in 10 iterations
Mad Pascal SIEVE: 658 ticks in 10 iterations
Od 1 do 48 z 48