Wars and Windows
Volume Number: 4
Issue Number: 10
Column Tag: Basic School
Basic Wars and True Windows 
By Dave Kelly, Editorial Board
Basic Wars Revisited
I promised more information about True Basic. First I would like you to refer
back to MacTutor August 1986, February 1987 and March 1987 for the previous
episodes of “Basic Wars”. The following table gives True Basic (Version 2.0) data for
most of the benchmarks used to compare ZBasic and MS Basic 2.0 the last time I ran
the benchmark. Please be aware that the math operations were corrected in the March
1987 issue. From a comparison of the benchmarks we can draw a few conclusions.
First, True Basic appears to be faster for all math operations even though True Basic
is not truly compiled. Only Microsoft Basic (binary) is comparable in math speed, but
does not include the accuracy of True Basic. Graphic operations are slower than the
MS Basic interpreter. Array look up was comparable to compiled speeds for MS Basic
or ZBasic. String handling approaches ZBasic compiled speeds. True Basic ran the
Sieve in less time than the MS Interpreter, but slower than any of the compiled
Basics.
Still keep in mind that benchmarks are not the only way to determine the
strengths of a language. These results show that True Basic performs very well
considering that it is not truly compiled to native machine code. It would be much
more of a speed competitor if it was compiled. True Basic’s strengths are in other
areas which cannot be measured only by benchmarks. To some people the other
capabilities of True Basic are not enough to justify the slow speed. If the only thing
you are looking for in a language is speed then you’ll probably be disappointed.
True Basic Benchmark: System 6.0
BENCHMARK Macintosh Plus Macintosh II
FOR Loop 1.6 sec. .388 sec.
Array Lookup 20.67 sec 5.25 sec.
Math Operations
Addition 22.15 sec. 3.8 sec.
Subtraction 23.23 sec. 3.55 sec.
Multiply 25.55 sec. 3.8 sec.
Divide 39.15 sec. 3.78 sec.
String Operations
Concatenation 10.3167 sec. 2.35 sec.
Matching 12.15 sec. 3.12 sec.
Line(Basic statement)
61.25 sec. 15.33 sec.
Horizontal line 38.867 sec. 12.3 sec.
Circle 13.4667 sec. 6.63 sec.
Set Pixel (PLOT) 119.3 sec. 37.83 sec.
File I/O (Floppy disk)
Random READ 24.5 sec. 8.2 sec.
Random WRITE 43.48 sec. 13.7667 sec.
Sequential PRINT #17.0667 sec. 4.3 sec.
Sequential INPUT 17.45 sec. 4.533 sec.
Sieve (1980 primes) 118.917 sec. 29.0333 sec
Accuracy Benchmark
Answer: 503.543802149746 503.5438021499906
1.224999999999966
1.2299999999999960
.88333 sec. .166667 sec.
Some of True Basic’s strength comes from the structured nature of the ANSI