BBS: Inland Empire Archive
Date: 06-13-92 (19:46)             Number: 304
From: JEAN CREPEAU                 Refer#: NONE
  To: BUTCH ADAMS                   Recvd: NO  
Subj: Looky-Here                     Conf: (2) Quik_Bas
In a message to ALL, BUTCH ADAMS wrote:
BA=> Here is an interesting thing I picked up in one of these magazines  in
    this stack over here this month:

BA=> now add DEFINT A-Z to the top of the code and run again.

BA=>  I  knew  to  use  integers  whenever  possible  but I had no idea the
    difference was this astounding!

        The INTEGERS are manipulated directly by the microprocessor,  which
can be done quickly. The use of SINGLE or DOUBLE implies the use of a  math
co-processor (which  is slower)  or a  math emulator  (which is  very slow,
compared to integers).

        Microsoft QB 1.0 didn't use a math co-processor or a math emulator.
Instead, they had a few routines  some for the SINGLE operations, and  some
for the DOUBLE. Of course the SINGLE operations were faster than the DOUBLE

        When I got QB 4.0, I noticed that all the SINGLE operations were as
slow as the  DOUBLE ones... Microsoft  included a math  emulator which does
not discriminate SINGLE  and DOUBLE. All  the floating numbers  are treated
equally... I  don't think  their emulator  supports temporary  real numbers
(ten bytes) so  I guess all  the real numbers  are treated as  DOUBLE. This
means that a SINGLE operation is as slow as a DOUBLE one.

        Depending on which version of QB you run your programs, you can get
very different results.

 * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET