20.02.2013 Views

ZX Computings - OpenLibra

ZX Computings - OpenLibra

ZX Computings - OpenLibra

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

I<br />

u<br />

<<br />

o<br />

•0<br />

8<br />

&<br />

£T<br />

©<br />

Benchmarks<br />

Testing<br />

your<br />

<strong>ZX</strong>81<br />

speed<br />

Henry Budgett and Tim Hartnell<br />

look at the 'standard' series of<br />

benchmark tests and apply them<br />

to the <strong>ZX</strong>81 to see how well it<br />

performs. Try the tests yourself<br />

and see if your machine<br />

measures up.<br />

There are a number of ways to establish the efficiency of a computer,<br />

and the tests performed are generally called 'benchmarks'.<br />

Each set of these standard tests tries out a function or functions of<br />

the computer, and produces a measureable result which can be<br />

compared with other computers performing similar tasks.<br />

The most commonly used tests in the microcomputer world are<br />

those introduced way back in 1977 by the Yankee magazine<br />

KILOBAUD. While they're not particularly rigorous, they do offer a<br />

quick and simple solution to the problem of checking out how well<br />

the computer performs certain arithmetic functions.<br />

The speed of processing depends on the speed of the microprocessor's<br />

clock. In the <strong>ZX</strong>81, the BASIC runs at 3.25 MHz.<br />

There are eight benchmarks in the series. Apart from the last<br />

one — which requires the presence of certain mathematical functions<br />

and demands floating-point numbers — you'll be able to run a<br />

version of them on the <strong>ZX</strong>BO. Each test should be run and timed 10<br />

times, then an average of the results obtained.<br />

The first test is a simple loop program that sets up a FOR . . .<br />

NEXT loop of 1000 counts. This, and the other tests, waits until a<br />

key is pressed after pressing RUN before starting the program. You<br />

enter RUN, then press NEWLINE, and then touch any key (except<br />

BREAK) as you start your timing. Lines 5 and 10 in each program<br />

ensure that the program waits until la) you've taken your finger off<br />

the RUN key (line 5) and then until you've pressed any key (line<br />

10). You'll obviously have to omit these lines on the <strong>ZX</strong>BO. You<br />

stop timing when the zero appears in the top left-hand corner of the<br />

screen.<br />

The tests are particularly fascinating if you can run them on<br />

another computer to compare the times. The <strong>ZX</strong>81 is not a very<br />

fast machine, even in FAST mode. Part of the slowness can be<br />

attributed to the fact that the <strong>ZX</strong>81 stores all numbers as if they<br />

were floating point numbers (ie as if they had digits after a decimal<br />

point), even when they are integers (whole numbers). The more<br />

bytes a variable occupies, the longer it is going to take to process<br />

<strong>ZX</strong> COMPUTING SUMMER 1962<br />

the information stored, and storing each number as a floating -point<br />

number uses up much more space than does storing such numbers<br />

as integers. Other BASICs (such as the Acorn Atom and the BBC<br />

Microcomputer, for example) allow you to specify which sort of<br />

numbers you wish to deal with, and allots only the necessary space<br />

to do so, thus maximising memory and processing speed. The<br />

<strong>ZX</strong>80, of course, works only in integers.<br />

Anyway, here is the first benchmark:<br />

1 REM *BENCHMRRK DNE*<br />

5 IF INKEY $**'* THEN GOTO 3<br />

10 IF I N K E Y T H E N GOTO JO<br />

B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!