New pictures of our new game (Development MSX Fora)MSX Resource Center            
            
English Nederlands Espa�ol Portugu�s Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 53 gasten en 4 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - New pictures of our new game

Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 | 5 | 6 | 7 Volgende pagina )
Schrijver

New pictures of our new game

flyguille
msx master
Berichten: 1223
Geplaatst: 08 Mei 2004, 18:31   
You are not taking in account all the task that the interpreter do when change the line number..

Ofcourse, check a variable 1 time is faster than check 3 times.

maybe some bechmarks will to figure it

Quote:

Of course, about that 'all bits are set'... I could have figured myself

About the speed of the ON x GOTO statement:
It's also faster because BASIC only has to read the INT value once. If you've something like this:

IF X=2 THEN 200
ELSE
IF X=3 THEN 500
ELSE
IF X=6000 THEN 20

The X will be read thrice from memory. Variable handling is just a 'little' bit slow in BASIC (unless they're integers, of course. But still then they're read thrice. ON x GOTO will be MUCH faster because the variable's only accessed once).


[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 08 Mei 2004, 20:05   
Well, in this case I'm almost sure that the ON x GOTO will work faster. The line number change internally HAS to be done, no matter what. Compare these two:

IF X=2 THEN 200
ELSE
IF X=3 THEN 500
ELSE
IF X=4 THEN 800


and

ON X-1 GOTO 200,500,800

The latter assumes X is limited between 2 and 4, so for simple cases like this example, I suggest you'd use ON x GOTO. In the previous example (that IF X=6000 GOTO 20) it's more difficult since 6000 doesn't fit in the range of 0-255.
flyguille
msx master
Berichten: 1223
Geplaatst: 08 Mei 2004, 20:13   
Yeah, i not desagree with that

EVERY IS FASTER IF YOU NEED GOTO SOMEWHERE ON ALL PROPOSES

but by example


if a=0 then x=e*y else if a=1 then x=e*z else x=e*x

this is faster than

on a gosub 100, 200 , 300

100 x=e*y:return
200 x=e*z:return
300 x=e*x:return

or

10 on a goto 100,200, 300
100 x=e*y:goto 20
200 x=e*z:goto 20
300 x=e*x:goto 20

or

10 on a goto 100,200, 300
100 x=e*y
...
200 x=e*z
...
300 x=e*x
...



So, if you need goto somewhere ALLWAYS is faster, but is not, if you use it for a single sentences.

BECAUSE EACH TIME THAN THE CURRENT LINE NUMBER CHANGE, IF VERIFY ALL BASIC EVENTS, AND NEED TO UPGRADE SEVERAL VARIABLES AND POINTERS.
[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 08 Mei 2004, 21:00   
... And I happily agree with that ^^;
ro
msx guru
Berichten: 2346
Geplaatst: 12 Mei 2004, 13:48   
to put is more strict:

BASIC is a (realtime..duh) interpreter which compiles one BASIC line on 1 go. Using more instructions on one BASIC line (hurray for oneliners!!) is much faster than having the same instructions spreaded on multiple BASCI lines (although less readable)

flyguille
msx master
Berichten: 1223
Geplaatst: 12 Mei 2004, 15:37   
Quote:

to put is more strict:

BASIC is a (realtime..duh) interpreter which compiles one BASIC line on 1 go. Using more instructions on one BASIC line (hurray for oneliners!!) is much faster than having the same instructions spreaded on multiple BASCI lines (although less readable)



i think is one command interpreter, but maybe can be one line....

That is easy to benchmark for know if that is true

First , you need bechmark a empty loop


10 TIME=0:FOR x%=0 to 10000
100 NEXT:PRINT TIME


So, in that way yo got the time needed for the loop

now you will to insert

20 y%=0
30 y%=0

And you got a new time, that time is the needed, for do that work, and for run that 2 commands.

then, erase the line 30

and

20 y%=0:y%=0

and you will got a 3er time, so, if this 3er time is = to the last time, so, the interpreter ejecute and load command by command, and not line by line, but, you need consider the time of the line number change, so this time, can by a little shorter.

For test the it you can now, change

20 y%=0:y%=0:y%=0:y%=0

To the result time you need RT= RT - bucle time

well, i do a mess here. But surelly you will found the way to benchmark the diferent proccess of the basic interpreter.


wolf_
online

msx legend
Berichten: 4777
Geplaatst: 12 Mei 2004, 15:49   
there is a
 uhm .. :)  
CODE /CODE command in which you can code without smileys

FOR A=0 to 10:NEXTA

flyguille
msx master
Berichten: 1223
Geplaatst: 12 Mei 2004, 15:58   
Quote:

there is a
 uhm .. :)  
CODE /CODE command in which you can code without smileys

FOR A=0 to 10:NEXTA




yea yeah,, jajajajaja
fixed
flyguille
msx master
Berichten: 1223
Geplaatst: 12 Mei 2004, 15:59   
quote quote sucks here!!!.
wolf_
online

msx legend
Berichten: 4777
Geplaatst: 12 Mei 2004, 16:02   
well, within 30mins. you can edit your post ...
flyguille
msx master
Berichten: 1223
Geplaatst: 14 Mei 2004, 18:31   
Quote:

Quote:

there is a
 uhm .. :)  
CODE /CODE command in which you can code without smileys

FOR A=0 to 10:NEXTA




yea yeah,, jajajajaja
fixed



Why these QUOTE don't work and others on the MRC work?. What i are doing wrong?
GuyveR800
msx guru
Berichten: 3048
Geplaatst: 14 Mei 2004, 19:30   
apparently <CODE> cannot be used in <QUOTE>
flyguille
msx master
Berichten: 1223
Geplaatst: 16 Mei 2004, 01:23   
Quote:

apparently <CODE> cannot be used in <QUOTE>



And a quote inside of other quote also don't work....
[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 16 Mei 2004, 03:27   
ONTOPIC
Erm... back to the 'new pictures of our new game'-like-thing
ENDONTOPIC
snout

msx legend
Berichten: 4991
Geplaatst: 24 Augustus 2004, 22:18   
Is this game still scheduled to be released in Bussum 04?
 
Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 | 5 | 6 | 7 Volgende pagina )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.