Path: utzoo!attcan!uunet!van-bc!nuucp From: lphillips@lpami.wimsey.bc.ca (Larry Phillips) Newsgroups: comp.sys.amiga Subject: Re: Compiled BASIC recommendations needed Message-ID: <2432@van-bc.UUCP> Date: 20 May 89 16:20:38 GMT Sender: usenet@van-bc.UUCP Lines: 97 In <1900@ektools.UUCP>, barrett@ektools.UUCP (Chris Barrett) writes: > In article <18480@cup.portal.com> Doug_B_Erdely@cup.portal.com writes: >> Get Hi-Soft Basic! It is like AmigaBasic but compiled. You can load in a Amiga- > > What about sizes of compiled files, How does it compare to the size of the > source? Speed of compilation? Speed of execution? How does it compare to > AC-Basic compiler? Inquiring minds want to know! Thanks for any info. Compiled files are very reasonable in size. There is an option that allows you to compile to two types of code, one that uses the supplied hisoftbasic.library, and one that compiles to standalone executable requiring no other modules/files to run. The type that needs the library builds the smallest executable (see below) Here are some stats for you. The first is a non-trivial program that does a sort of a pretty-print of a file captured from a Compuserve COnference. It checks the lengths of the names of the participants and formats lines accordingly, removing the Compuserve specific room number, parens, job numbers, or user ID numbers, allows selective inclusion or exclusion of participants by name, inclusion or exclusion of private messages received, and inclusion or exclusion of 'status' resukts, showing who is on-line at the time. I wrote it as an excercise to see how the language was, and it turned out to be useful (I know of one fellow who saves himself an hour or two every week with it). Calculations.bas is the (probably older version) Byte benchmark of the same name. Code follows: -------------------------- REM $EVENT ON REM $OPTION B+,G-,N+,L-,Y+ defint i nr = 5000 a = 2.71828 b = 3.14159 c = 1 for i = 1 to nr c = c*a c = c*b c = c/a c = c/b next i print "error ="; c-1 ------------------------- Stats: ------ cofilter.bas 4470 bytes - (about 190 lines of code) calculations.bas 173 bytes - (see code above) Compiled to run with hisoftbasic.library ---------------------------------------- cofilter 6148 bytes - Time to compile: 9.32 seconds calculations 712 bytes - Time to compile: 3.46 seconds NOTE: hisoftbasic.library - 46672 bytes (required at run time for above) Compiled standalone ------------------- calculations 12440 bytes - Time to compile: 4.14 seconds cofilter 23972 bytes - Time to compile: 10.56 seconds Runtime speed ------------- Calculations: 3.58 seconds, error =-1.192093E-07 Cofilter: N/A NOTE: May '85 True Basic review gave the following times and results (on IBM PC) True Basic: 19.7 seconds, error = -4.5830006457E-13 PC-Basic: 69.2 seconds, error = -1.788139E-07 BetterBASIC: 91.3 seconds, error = 0 (uses BCD internally) Turbo Pascal: 82.6 seconds, error = -1.3384124031E-08 ------------------------------ I have not used AC-Basic, since I was completely turned off by the minimum standalone code size, which includes the entire run-time library, whether you need it or not. I think this is a great package, even if I don't like Basic much. -larry -- - Don't tell me what kind of a day to have! - +----------------------------------------------------------------------+ | // Larry Phillips | | \X/ lphillips@lpami.wimsey.bc.ca or uunet!van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 | +----------------------------------------------------------------------+