News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_ComSoft6128

Home computer BASIC performance tests, some benchmarks

Started by ComSoft6128, 18:50, 02 August 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ComSoft6128


Prodatron

Here is a table for a better comparison:

You cannot view this attachment.

It's crazy, that all the other machines are mostly crap regarding Basic speed. No idea, why the Spectrum is so slow. MSX and C64 both have an original Microsoft Basic, just the C128 had a new Basic, which tried to catch up to the CPCs Locomotive Basic with not so much success it seems :D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

Oh, great to see the performance of the last benchmark 8:
It is using scientific floating point functions,
Sinus, Natural Logarithm and Exponentiation.

Here the CPCs FP routines seem to be even much more powerful compared to the other systems (good to know, as I am using them in SymCalc  :) ).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

jesusdelmas

Quote from: Prodatron on 19:43, 02 August 24Here is a table for a better comparison:

You cannot view this attachment.

It's crazy, that all the other machines are mostly crap regarding Basic speed. No idea, why the Spectrum is so slow. MSX and C64 both have an original Microsoft Basic, just the C128 had a new Basic, which tried to catch up to the CPCs Locomotive Basic with not so much success it seems :D
I always knew It. Amstrad Basic was a máster piece

robcfg

I think BBC Micro/Electron and the swedish Luxor ABC computers would be great candidates for this test too.

And it's no secret I have a veeeeery soft spot for the Dragon computers, so I may try on them  ;)

Prodatron

Quote from: robcfg on 21:32, 02 August 24I think BBC Micro/Electron and the swedish Luxor ABC computers would be great candidates for this test too.

And it's no secret I have a veeeeery soft spot for the Dragon computers, so I may try on them  ;)
Cool please do it, thats very interesting.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

ZorrO

There is a video on YT comparing the speed of Basic on C64 and CPC using an algorithm for finding prime numbers.

10 FOR i=2 TO 1000
15 k = INT(SQR(i)) + 1
20 FOR j = 2 TO k
30 k1 = i / j
40 k2 = INT(k1)
50 IF k1 = k2 THEN GOTO 80
60 NEXT j
70 PRINT i
80 NEXT i




Some of my friends made the same test on other computers:

- 0'30 - Amiga Basic
- 0'44 - Atari ST Basic - but GW Basic or GFA Basic are much faster.
- 0'47 -  BBC Micro
- 1'04 - BBC Electron
- 1'14 - Sam Coupe
- 1'19 - CPC 6128 (80) - Math routines in 6128 are a bit faster than in 464
- 1'20 - Sinclair QL
- 1'22 - CPC 464 (40) - display in MODE 1 is a bit slower than in MODE 2.
- 1'23 - C128 (80) -  80 column mode is necessary to switch MOS processor into 2MHz
- 1'50 - C= Vic20
- 1'57 - Apple II
- 2'15 - C64       
- 2'16 - C+4       
- 2'48 - C128 (40)
- 3'28 - C128 CP/M - Microsoft Basic, on Z80 2MHz
- 3'50 - Atari XL/XE
- 3'53 - MSX1   
- 4'08 - ZX 48 
- 4'50 - ZX 128 
- 13'12 - ZX81 - with screen on is sooo slow, screen off gave time about 4 times faster 3'28

So to sum up, the approximate speed of Basic to BBC Micro. (Tested with a program for finding prime numbers). The number at the beginning of line means how many times slower than BBC Basic are Basic in others computers listed on this line.

1 - BBC, ST...
2 - CPC, C128 (80col), SamCoupe, QL, Electron...
3 - AppleII, C+4, Vic20...
4 - C64, TandyTRS...
5 - ZX81 (screen off)...
7 - ZX, XE, MSX...
20 - ZX81 (screen on)


And one more...  I don't remember where I found the results of the test comparing the speed of displaying letters. Amstrad is very poor here, but Fast Print procedures (as for example in XD-DOS ROM) speed it up by about 7 times, which would give the best result.

ZX 81                                          -->                                                          110
ZX 48                    25
CPC                    24
C128                21
ZX +2              20
C+4                19
MSX            15
C64            15
XL/XE      12
Meritum    11
Apple II  10
Vic20    9
Elec.  7
BBC  5
CPC+PSX 4ever

lmimmfn

Regarding the speed of displaying characters and fast print routines, presumably basis is using the firmware? Has anyone tried to patch CPC roms to improve this or other things?
6128 for the win!!!

andycadley

Not really surprised about the print speed, the faster machines have character mapped displays so only need to write a single byte to put a character on screen. Not easy to compete with that when you have to update a bitmap (and especially not one as large as the CPC).

retro space

P2000T (Z80 @ 2,5MHz)
1: 1,8s
2: 7s
3: 17s
4: 19s
5: 19,5s
6: 31s
7: 49s
8: 88s
Not bad to end between the C64 and C128. And totally weird it outperforms the next-in-line Philips computer, the MSX.
Also note the routines get quicker if you use % variables for counters, where on a C64 that makes execution slower.

Primenumber test 2:04
Teaching computer science on a high school with the CPC, P2000T, Spectrum and C64.

Prodatron

Quote from: retro space on 15:55, 03 August 24P2000T (Z80 @ 2,5MHz)
1: 1,8s
2: 7s
3: 17s
4: 19s
5: 19,5s
6: 31s
7: 49s
8: 88s
Not bad to end between the C64 and C128. And totally weird it outperforms the next-in-line Philips computer, the MSX.
Also note the routines get quicker if you use % variables for counters, where on a C64 that makes execution slower.

Primenumber test 2:04
Philips probably used another Basic (Not Microsoft) before the MSX?

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

retro space

Philips P2000T Basic is made by Microsoft in 1980, but unlike with most others, it is not visible on boot nor in the binary code.
Teaching computer science on a high school with the CPC, P2000T, Spectrum and C64.

jjne

The Spectrum's BASIC was optimised for space restraints rather than performance, as was Sinclair's way. The MSX being slow is more of a mystery - there's no real reason it should be significantly slower than the CPC. 

Prodatron

Quote from: jjne on 15:56, 05 September 24The MSX being slow is more of a mystery - there's no real reason it should be significantly slower than the CPC.
(Possible) Reason 1:
MSX Basic is based on "Basic-80", which was written for the Intel 8080 with no usage of the advanced Z80 possibilities. While MSX-DOS is optimized for the Z80 I have no idea if they upgraded the Basic-80 code used in MSX-Basic for Z80 efficency as well.

Reason 2:
MSX Basic is using decimal (BCD) based floating point routines, which has sometimes advantages regarding rounding issues. I don't know how much, but of course this is slower than using binary based floating points like in Locomotive Basic.

Reason 3:
IIRC MSX Basic works with double-precision values by default, which use 64 bits (8 bytes) for each number ( see here ). The FPs in Locomotive Basic are "only" 40 bits (5 bytes) in size.

While reason 1 is only a speculation, reason 2 is a fact and reason 3 is something which I read in the MSX forum.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

ZorrO

There is faster Basic for MSX2 on Cartridge, I forget name.
As I know most MSX2 have old Basic from MSX1, without extra command for new graphic modes and better more colors in sprites. So they have similar problem like CPC+ owners.
CPC+PSX 4ever

Prodatron

Quote from: ZorrO on 17:13, 06 September 24There is faster Basic for MSX2 on Cartridge, I forget name.
May you have one of these basic compilers in mind?


Quote from: ZorrO on 17:13, 06 September 24As I know most MSX2 have old Basic from MSX1, without extra command for new graphic modes and better more colors in sprites. So they have similar problem like CPC+ owners.
No, all MSX2 machines have MSX Basic 2.x. MSX had some very strictly defined standards.

The same for MSX2+ machines, which all have MSX Basic 3.0, and TurboR machines, which all have MSX Basic 4.x.

All these newer basic versions supported (most of?) the new features of the newer machine generations. So they didn't have the problems like the CPC+.

Maybe you mixed this with the Disc Basic version. Most had low version numbers like "1.0", see here (thanks to @Edoz(MSX) for the information!):


You cannot view this attachment.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

McArti0

Quote from: ZorrO on 04:01, 03 August 2410 FOR i=2 TO 1000
15 k = INT(SQR(i)) + 1
20 FOR j = 2 TO k
30 k1 = i / j
40 k2 = INT(k1)
50 IF k1 = k2 THEN GOTO 80
60 NEXT j
70 PRINT i
80 NEXT i


- 3'53 - MSX1   


For single precision (all variables V! instead V#) - 3'47  :-X instead 3'53
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

Powered by SMFPacks Menu Editor Mod