Welcome, Guest. Please login or register.


Author Topic: 8-bit machines Basic performance (Read 13335 times)

Offline Herbert123

  • Newbie
  • Posts: 10
  • Country: ca
8-bit machines Basic performance
« on: 2023.February.03. 01:36:10 »
The other day I was watching
https://www.youtube.com/watch?v=H05hM_Guoqk

In the video the presenter tests the following Basic program on various 8-bit machines to compare the TI-99/4A performance - the program is meant to



The presenter explains that the TI/99's video ram is used to save the basic program in, and therefore the video processing slows down the cpu running the program. Interestingly enough the ZX Spectrum performs very poorly here.

The Amstrad performs best (I used to own a CPC 664 back in the day).

They did not test the Enterprise, and while I still haven't been able to fix and test my Enterprise 64 for a real test with a physical machine, I typed the listing in ep32, and ran it.



To my surprise it took quite a while to complete: a whopping 86 seconds!

Can anyone here with a real Enterprise double-check if it indeed takes that long to complete?
If so, what would a technical reason be? Why would the Enterprise take more than 3 times longer than an Amstrad machine in this particular test?

PS
I ran the same program in WinApe to check if it runs at the same speed as a real one (and it does: same result as in the video).

Offline gflorez

  • EP addict
  • *
  • Posts: 3588
  • Country: es
    • Támogató Támogató
Re: 8-bit machines Basic performance
« Reply #1 on: 2023.February.03. 03:32:03 »
The 128 model will do the same only lasting a few seconds less... It doesn't share the Video memory, so the Z80 is not restricted.

You can test it yourself with the EP128emu emulator. It is more up to date than EP32.

It is not the fastest Basic on the universe.... but on the other side the machine offers a good integration of its outstanding features(video, audio) on the Basic commands, so at the end it is enough fast doing its things.

The main characteristic of  IS-BASIC is that it conformed strictly to ANSI BASIC, so it was not based on Microsoft Basic, the de-facto standard on almost all microcomputers of the 80's era. It is probably that its complexity made it slower than the other dialects.  

I feel it easier to program than  the competitors on your chart that I have managed. I specially like its Basic editor and the variety of good commands for almost any task.

If you want more speed you also can try the Zzzip Basic compiler.
« Last Edit: 2023.February.03. 11:47:28 by gflorez »

Offline Herbert123

  • Newbie
  • Posts: 10
  • Country: ca
Re: 8-bit machines Basic performance
« Reply #2 on: 2023.February.03. 07:37:52 »
@gflorez Thanks for the compiler!

I compiled the benchmark, and now it finishes in a little less than 6 seconds! 86 versus 6 seconds. Not bad!

Thanks again!

Offline Trefe

  • User
  • *
  • Posts: 65
  • Country: hu
Re: 8-bit machines Basic performance
« Reply #3 on: 2023.February.03. 20:04:19 »
                      EXOS2.1                                        ISDOS
                                                                        (C/PM 2.2)
                   IS-BASIC 2.1                          MicroSoft BASIC 5.21

           4MHz             7.12MHz                   4MHz               7.12MHz

           86 s                  41 s                       46 s                  22 s



Trefe

Offline Povi

  • EP addict
  • *
  • Posts: 2266
  • Country: hu
    • http://povi.fw.hu
Re: 8-bit machines Basic performance
« Reply #4 on: 2023.February.04. 09:47:15 »
about 25 sec in Altair Basic 4K (Microsoft)
*** Speicherplatz zu klein

Offline gflorez

  • EP addict
  • *
  • Posts: 3588
  • Country: es
    • Támogató Támogató
Re: 8-bit machines Basic performance
« Reply #5 on: 2023.February.05. 01:28:49 »
We also have the emulated machines to try, Spectrum and CPC... 

Offline Herbert123

  • Newbie
  • Posts: 10
  • Country: ca
Re: 8-bit machines Basic performance
« Reply #6 on: 2023.February.05. 01:40:20 »
We also have the emulated machines to try, Spectrum and CPC...

I already tested in WinApe CPC emulator: exactly the same result (26 seconds) as on a real machine.

about 25 sec in Altair Basic 4K (Microsoft)


Wow! Where can I find Altair Basic?

@Trefe thank you for the physical machine test! Interesting to see that even on 7.12Mhz IS-Basic is almost twice as slow as on a 4MHz Amstrad.

ps soon I will have access to a real C64 again. Uncle of mine found his while clearing out the loft. :-)
I am on the outlook for an Amstrad 6128.

Offline gflorez

  • EP addict
  • *
  • Posts: 3588
  • Country: es
    • Támogató Támogató
Re: 8-bit machines Basic performance
« Reply #7 on: 2023.February.05. 08:49:12 »
I have not explained me well: The Enterprise can emulate CPC, Spectrum, Commodore16 and TVC.

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1282
  • Country: hu
  • Stray cat from Commodore alley
Re: 8-bit machines Basic performance
« Reply #8 on: 2023.February.05. 09:08:06 »
...Enterprise can emulate CPC, Spectrum, Commodore16 and TVC.
Well, actually stating EP can emulate C16 is a bit daring IMHO. Even if you consider only BASIC.

Offline Povi

  • EP addict
  • *
  • Posts: 2266
  • Country: hu
    • http://povi.fw.hu
*** Speicherplatz zu klein

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9842
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: 8-bit machines Basic performance
« Reply #10 on: 2023.February.05. 17:21:04 »
about 25 sec in Altair Basic 4K (Microsoft)
In the picture, the bottom of the screen is cool, with the information about the function keys.
The upper part of the invert characters look a bit ugly as always, they would be pulled down one pixel. But this is not a problem here. Pity that it was not done this way originally.
---
A képen, a képernyő alján király, hogy ott van az információ a funkcióbillentyűkről.
Az inverz karakterek felső része kicsit csúnya, mint mindig, egy pixellel lejjebb kellene tolni őket. De itt ez nem gond nyilván. Gyárilag kár, hogy nem így csinálták meg.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline Herbert123

  • Newbie
  • Posts: 10
  • Country: ca
Re: 8-bit machines Basic performance
« Reply #11 on: 2023.February.06. 00:08:08 »
Well, actually stating EP can emulate C16 is a bit daring IMHO. Even if you consider only BASIC.

Ah, understood. I tested the "benchmark" in ep32 with the CPC emulator.

It finishes at 31 seconds. 5 seconds slower than a real or emulated CPC.

Seems to me that the CPC emulation on the EP is not as fast as a real or emulated CPC. Still much faster than either exdos basic or altair basic.

Still wondering why the basic interpreters are relatively slow on an Enterprise. I did some more testing with the compiled version on both the EP and the CPC, and while the EP takes ~1.86 seconds (including disk access), the CPC version finishes about 2.6 times faster (~0.7sec).

With disc accessing included the EP takes ~4.87 seconds, and the cpc ~1.9 seconds. Disc accessing seems slower as well on the EP, but I can't be sure without physical machines.

Obviously different compilers, and can't be directly compared - but still. The CPC hardware architecture might be more efficient? Not sure.

(Good news: I might be getting my hands on a real CPC664 again soonish!  :-) )

And I really want to hook up my Enterprise 64 to a screen, but I do not have a scart compatible screen right now. Yes, I unfortunately purchased the Spanish video cable... I still haven't been able to test my EP.


Offline Herbert123

  • Newbie
  • Posts: 10
  • Country: ca
Re: 8-bit machines Basic performance
« Reply #12 on: 2023.February.06. 00:11:34 »
The time of ~1.86 seconds mentioned above is the one with the disk accessing EXCLUDED. Not included. I tried to edit the post, but it didn't take.

Offline geco

  • EP addict
  • *
  • Posts: 7013
  • Country: hu
    • Támogató Támogató
Re: 8-bit machines Basic performance
« Reply #13 on: 2023.February.06. 08:41:55 »
It finishes at 31 seconds. 5 seconds slower than a real or emulated CPC.

Seems to me that the CPC emulation on the EP is not as fast as a real or emulated CPC. Still much faster than either exdos basic or altair basic.
CPC emulation on the EP is only a modified CPC ROM, and some modifcation can cause little slowdown, ex if the CPC ROM is placed into video RAM, and AY emulation routine can cause slowdown also, as i remember it is called in each 300Hz interrutp.

Still wondering why the basic interpreters are relatively slow on an Enterprise. I did some more testing with the compiled version on both the EP and the CPC, and while the EP takes ~1.86 seconds (including disk access), the CPC version finishes about 2.6 times faster (~0.7sec).
This basic testing is not the best measurement of capabilities of a computer, because it tells mainly that how fast the basic itself, IS-Basic handles differently the numbers (if i know well) than other Basics, it uses in BCD format, number handling is slower in IS-Basic, and it is much more complex than others.

With disc accessing included the EP takes ~4.87 seconds, and the cpc ~1.9 seconds. Disc accessing seems slower as well on the EP, but I can't be sure without physical machines.

Obviously different compilers, and can't be directly compared - but still. The CPC hardware architecture might be more efficient? Not sure.
Floppy Disk i/o is much faster on Enterprise than on CPC. Normally most of the things can be solved faster on EP than on CPC, because the CPC uses 16 bit I/O ports, Enterprise uses 8 bit I/O ports, and accessing 8 bit I/O ports needs less cpu time, and there is one thing which needs too much instruction on CPC, accessing the keyboard, and AY, 1st you need to program the 8255 PPI to be able to access them, then you can address the needed AY port, and at the end PPI should be instructed again.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14682
  • Country: hu
    • http://enterprise.iko.hu/
Re: 8-bit machines Basic performance
« Reply #14 on: 2023.February.06. 09:14:36 »
Still wondering why the basic interpreters are relatively slow on an Enterprise.
For the answer try this test on various computers:
10 FOR I=1 TO 10 STEP 0.1
20 PRINT I
30 IF I=1.3 THEN STOP
40 NEXT I