msx basic speed

Page 1/2
| 2

By PingPong

Prophet (3083)

PingPong's picture

21-01-2018, 22:29

anyone knows about msx basic speed compared to other 8 bit micros like:
zx spectrum
c64
c16
amstrad cpc
.....

what's the best/worst in terms of average speed?

Login or register to post comments

By TomH

Master (191)

TomH's picture

22-01-2018, 16:58

Assuming you are willing to believe that MSX BASIC is similar enough to SVI-328 BASIC as to perform at a similar speed, and accept the PCW benchmarks as a decent test (source code is at the location linked; this is a benchmark platform that the magazine PCW developed and used back when all these machines were current) then the BBC Micro is the fastest of the 8-bit machines and the ordering of those you've listed and which are listed on the linked site is: CPC, MSX, Spectrum. If you assume the C64 and C16 are approximately the speed of a Vic-20 (essentially the same BASIC, with essentially the same processor running at a similar speed), then they're somewhere between the CPC and MSX.

It seems weird to me that Microsoft BASIC (common to the MSX and the Commodores) is apparently much faster on a 6502 than a Z80 given its heritage, but there it is. Quality of adaptation is obviously a factor, since the Oric also runs a Microsoft BASIC variant, with a 6502 at approximately the same clock speed as the Commodores, but its average score is worse even than a Spectrum.

By santiontanon

Hero (539)

santiontanon's picture

22-01-2018, 17:23

Could it be the CPC comes on top just because the Z80 on a CPC runs at a higher frequency than on an MSX or a Spectrum?

By TomH

Master (191)

TomH's picture

22-01-2018, 17:39

I think it's just likely to be a better implementation of BASIC, since the official 4Mhz rating is very misleading and because the machine came out a couple of years later than most of its competitors, giving a chance to benefit from hindsight.

Unlike the MSX but like almost everything else, the CPC shares RAM between the CPU and the video output. To achieve that it offers the CPU a RAM access window only once in every four cycles, through manipulation of the WAIT line. Which at best means to round up however long the instruction should have taken to the next multiple of four. CPC users tend to say it makes the CPU equivalent to approximately 3.3Mhz in practice, as a rough guide.

I think the BBC probably benefits a lot from a fast CPU — it's a 2Mhz 6502 with no slow downs or delays for most accesses, and obviously 6502s are a little more cycle efficient.

By ricbit

Champion (409)

ricbit's picture

22-01-2018, 17:54

I think this PCW comparison is a bit misleading, the MSX variables default to double precision floating point, and that may be not true in the other BASICs.

The MSX BASIC certainly has room for improvements though, mainly because it was optimized for size, not for speed.

By PingPong

Prophet (3083)

PingPong's picture

22-01-2018, 21:49

TomH wrote:

It seems weird to me that Microsoft BASIC (common to the MSX and the Commodores) is apparently much faster on a 6502 than a Z80 given its heritage, but there it is.

commodore basic is a m$ derivative, but it is somewhat more limited.
the more limited, the more faster to parse / tokenize / execute.
It is not excluded that commodore did some optimizations on the original basic even at the era of PET Basic

Plus the BBC Micro had a 2Mhz 6502 cpu that should be compared to a 5Mhz z80 or more.
Even the Amstrad CPC goes so near to BBC Micro with a real 3,3Mhz z80.....
so not the fastest basic IMHO

By TomH

Master (191)

TomH's picture

22-01-2018, 21:54

A severely-chopped Commodore version might help to explain why the Oric (a 1Mhz 6502 running an adapted Microsoft BASIC) is approximately 27% slower than an MSX on the benchmarks, and more than twice as slow as the Vic-20, despite the Vic-20 being clocked only around 2.25% higher. Both are essentially in a memory-mapped text mode*, so there's no inherent IO advantages that might skew the average that I can think of.

* the Vic-20 is purely a character-mapped mode, but the character patterns are in RAM so it's a lot like screen 1 in that regard. The Oric has a semi-teletext-esque system whereby control codes jump you between text and graphics mode during the course of a line, but graphics mode reads a full bitmap from elsewhere rather than trying to do anything within the character set so it is all-points-addressable at a resolution of 240x200. The 240 being because there's only six pixels per byte, to reserve space for control codes. Things like colour selection are inline just like graphics/text mode selection. In fact, it's all inline. No exposed registers whatsoever despite the selectable mode, palette and output frequency.

By PingPong

Prophet (3083)

PingPong's picture

22-01-2018, 22:04

TomH wrote:

A severely-chopped Commodore version might help to explain why the Oric (a 1Mhz 6502 running an adapted Microsoft BASIC) is approximately 27% slower than an MSX on the benchmarks, and more than twice as slow as the Vic-20, despite the Vic-20 being clocked only around 2.25% higher.

the IBM PC performances are not so exceptional considering that we have to deal with a 16 bit processor, with higher frequency than a z80 and less cycles per instructions......

By TomH

Master (191)

TomH's picture

23-01-2018, 15:23

I don't know the exact details of the 8088's prefetch queue, but the original IBM PC is trying to keep itself busy with only an 8-bit data bus, so I'm not sure it's so much more capable than the 8-bit through-and-through competition. It just had an appealing nameplate.

By rderooy

Champion (306)

rderooy's picture

23-01-2018, 16:24

Since the benchmarks are listed, I tried to run BM1 a few times on an emulated MSX1 with a stop watch, since the tests don't return runtime. Each time it took just over 2 seconds, which is worse then the SVI-328 score of 1.6 seconds. I did not try the others.

By PingPong

Prophet (3083)

PingPong's picture

23-01-2018, 21:14

TomH wrote:

I don't know the exact details of the 8088's prefetch queue, but the original IBM PC is trying to keep itself busy with only an 8-bit data bus, so I'm not sure it's so much more capable than the 8-bit through-and-through competition. It just had an appealing nameplate.

internally it is a 16 bit processor. it is also pipelined so i expect more faster operations....

https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1m...

"Depending on the clock frequency, the number of memory wait states, as well as on the characteristics of the particular application program, the average performance for the Intel 8088 ranged approximately from 0.33 to 1 million instructions per second.[8] Meanwhile, the mov reg,reg and ALU[b] reg,reg instructions, taking two and three cycles respectively, yielded an absolute peak performance of between 1/3 and 1/2 MIPS per MHz, that is, somewhere in the range 3–5 MIPS at 10 MHz."

Page 1/2
| 2
My MSX profile