Speed Comparison

Ici, on fait dans le petit, le LCD qui déchire sa race, on y cause même calculatrices quand on est en manque !

Modérateur : Politburo

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 04 avr. 2007 23:02

I have updated th table with your results, but I have some questions:

- which version of turbo c have you used?
- have you used the structured or unstructured version?
- what about the compiler directives like range checking for Basic or C?

One problem is that some results are very close to each other. So I try to have 2 or better 3 significant digits for measurement. If the execution is too fast for some Basic versions, please add a FOR NEXT loop to have more accurate timing. Sorry for the trouble.

Code : Tout sélectionner

 10 CLEAR:DEFINT A-Z
 20 R=8
 30 REM DIM A(R)      (DIM used if necessary)
 33 FOR N=1 TO 10
 36 S=0:X=0
 40 IF X=R THEN 180
 50 X=X+1
 60 A(X)=R
 70 S=S+1
 80 Y=X
 90 Y=Y-1
100 IF Y=0 THEN 40
110 T=A(X)-A(Y)
120 IF T=0 THEN 140
130 IF X-Y<>ABS T THEN 90
140 A(X)=A(X)-1
150 IF A(X)<>0 THEN 70     (<>0 omitted if possible)
160 X=X-1
170 IF X<>0 THEN 140       (<>0 omitted if possible)
180 NEXT
190 PRINT S
Dernière édition par Xerxes le 29 déc. 2007 14:49, édité 1 fois.

Avatar de l’utilisateur
jvernet
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 7838
Inscription : 24 mai 2002 09:57
Localisation : France 69
Contact :

Message par jvernet » 04 avr. 2007 23:34

Xerxes a écrit :I have updated th table with your results, but I have some questions:

- which version of turbo c have you used?
- have you used the structured or unstructured version?
- what about the compiler directives like range checking for Basic or C?
-Turbo C 2.0.1
-Structured
- Default option, Optimized for speed.
"l'ordinateur et l'homme sont les deux opposés les plus intégraux qui existent. L'homme est lent, peu rigoureux et très intuitif. L'ordinateur est super rapide, très rigoureux et complètement con."

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 04 avr. 2007 23:58

May be the reason of the same timing of QBasic and QuickBasic is that the range checking of QuickBasic is turned on by default.

Usually the unstructured version is faster. I am wondering that Turbo C is faster with the structured version.

If you want to test Turbo Pascal, please use the PB-2000C version.

The main reason for the structured version is, to have a pattern for languages without GOTO like LUA.

Avatar de l’utilisateur
jvernet
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 7838
Inscription : 24 mai 2002 09:57
Localisation : France 69
Contact :

Message par jvernet » 05 avr. 2007 14:51

Sorry, but there was a big bug in the bench prog I typed.... lol

HP200 LX:
QBasic, Interpreted, Integer: 3.3"
GWBasic , Interpreted, Integer: 19"
QuickBasic 4.5, Compiled, Integer: 9" for 10 iterations
Turbo C 2.01, Compiled, Structured: 7"40 for 100 iterations

Pentium IV 1.8 GHz, QuickBasic 4.5, Compiled, Integer: 0.0013" :lol:
"l'ordinateur et l'homme sont les deux opposés les plus intégraux qui existent. L'homme est lent, peu rigoureux et très intuitif. L'ordinateur est super rapide, très rigoureux et complètement con."

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 05 avr. 2007 15:45

No problem. Programming includes always debuging too. :wink:

QBasic is a bytecode interpreter, so its much faster than GWBasic. I guess Turbo Basic is the better compiler than QuickBasic.

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 06 avr. 2007 22:52

I have tested some languages on a 80486 Notebook:

Code : Tout sélectionner

GWBasic:      0.893  Token-Interpreter
Turbo Basic:  0.232  Compiler
QBasic:       0.139  Bytecode-Interpreter

Turbo Pascal 5.0: 0.00362
The execution time of Turbo Basic is really absurd for a compiler.

It was a good idea to test the HP200LX with different languages.

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 29 avr. 2007 09:21

The database was updated with Casio CFX-9850GB+ and Casio FX-880P.

The FX-880P and FX-603P have the same CPU @ 1.228 MHz.

Avatar de l’utilisateur
chr!x
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 892
Inscription : 26 févr. 2007 11:35
Localisation : CasioLand
Contact :

Message par chr!x » 29 déc. 2007 11:56

VX-1 : 3 min 55
FX-840P : 3 min 52
.....::::: La Bible du FX-850P - Groupe OISAC ::::::::::: CASIOthèque :::::.....
Image

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 29 déc. 2007 13:31

Salut chr!x,

merci for testing.

Avatar de l’utilisateur
chr!x
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 892
Inscription : 26 févr. 2007 11:35
Localisation : CasioLand
Contact :

Message par chr!x » 29 déc. 2007 13:33

You're welcome :)
.....::::: La Bible du FX-850P - Groupe OISAC ::::::::::: CASIOthèque :::::.....
Image

Avatar de l’utilisateur
chr!x
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 892
Inscription : 26 févr. 2007 11:35
Localisation : CasioLand
Contact :

Message par chr!x » 29 déc. 2007 13:54

VX-3 in basic : 3 min 14.
FX-870P in basic : 3 min 11.

Xerxes : I'll be very pleased testing 8 queens in CASL, but I don't know how to use CASL :oops:
.....::::: La Bible du FX-850P - Groupe OISAC ::::::::::: CASIOthèque :::::.....
Image

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 29 déc. 2007 14:32

Yes, it's not easy to understand the japanese manual. :wink:

I will try to explain how it works on VX-4:

- press [CASL]
- choose an empty program area with [<-] or [->]
- type [S] for "source" to start the editor
- type in the CASL code now
- press [CASL]
- press [A] for "Assemble" to compile to bytecode
- press [G] for "Go" and [EXE] to execute the test
- press [D] for "Dump"
- press [R] for "Register" to check, if "GR0" contains 876 decimal.

Avatar de l’utilisateur
chr!x
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 892
Inscription : 26 févr. 2007 11:35
Localisation : CasioLand
Contact :

Message par chr!x » 29 déc. 2007 15:25

Thanks ! Don't you konw how to do the same on FX-840P ?
.....::::: La Bible du FX-850P - Groupe OISAC ::::::::::: CASIOthèque :::::.....
Image

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 29 déc. 2007 15:57

Unfortunalety I have no experience with CASL on this pocket.
I assumed that it's the same or similar on the FX-840P. I will
send you a PM.

Avatar de l’utilisateur
chr!x
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 892
Inscription : 26 févr. 2007 11:35
Localisation : CasioLand
Contact :

Message par chr!x » 29 déc. 2007 16:54

CASL works :)

First tests :

FX-870P = 2 min 43
FX-840P = 56 sec

It's awesome that 840P is 3x faster than 870 !!! There is no bug, gr0 = 876.
.....::::: La Bible du FX-850P - Groupe OISAC ::::::::::: CASIOthèque :::::.....
Image

Répondre

Revenir vers « Tous les Pockets »