New answers tagged

7

[...] Sinclair ZX80 is much faster than Sinclair Spectrum on all tests despite the fact that both computers use the same CPU. It's not about the CPU, but because these are vastly different BASIC implementations. In this case it's due to integer vs. floating point maths. The fact is marked in the ZX80 entry by noting 'integer only'. The numbers shown are ...


2

The Byte Sieve benchmark, in Applesoft Basic took 2806 seconds, according to Byte Magazine, September 1981 issue, page 192. Byte Sieve in 6502 Assembly language took 13.9 seconds, according to Byte Magazine, January 1983 issue, page 292. That's a factor of 200X between a tokenizing Basic interpreter and hand-coded assembly for the 6502. 200X is in about ...


1

I've had experience with the TRS-80, and there were three programs I wanted to do that I simply could not get good performance in BASIC. All three programs were dealing with the screen. The first program was to fill the screen with a single arbitrary character (if you used space, it's the same as clear screen, else I could fill it with whatever character I ...


5

[Modern Python compared to C; C64 BASIC compared to assembly.] is there any comparison I could make? Is it even possible to quantify it this way? Yes, you have the right idea. That is exactly the comparison you can make. BASIC was easier to write (don't underestimate the value of that), but "slower" to "dreadfully slower", depending on what you ...


6

if I write a piece of code in Basic, would it be much slower than Assembly? Well, it's interpreted. So even though it's a simple language, it'll never reach native speed - not even coming close. If so, is there any comparison I could make? For most parts like with Python vs. Assembler on a PC (*1). Except of course, BASIC is a way less comfortable ...


43

Yes, BASIC is much slower than assembly for many operations. For an easy example, try out this program on a Commodore 64 or emulator: for i = 1024 to 1984 : poke i,peek(i) or 128 : next You will see each character on the screen reverse, row by row, over the course of ten seconds. By contrast, the exact same routine in machine language inverts the entire ...


16

Most implementations of BASIC for 8-bit home computers were interpreters, and in that sense they're similar to the standard versions of Python. You could typically expect simple programs to run 100 times slower in BASIC than in assembly of ordinary quality. However, it would normally take much less time to write that program in BASIC than in assembly. For ...


9

Generally speaking, Z80 is two to three times slower than 6502 since its fastest instruction is 4 cycles and 6502's is just 2. Then, if you take into account additional instruction bytes and memory addressing, Z80 looks like it's completely behind. But things in real life differs a bit. Z80 has more registers (7 primary, 7 secondary and 4 additional that ...


Top 50 recent answers are included