Infotek Compiler for HP 9000 Series 200/300
|
06-25-2016, 12:33 AM
Post: #11
|
|||
|
|||
RE: Infotek Compiler for HP 9000 Series 200/300
Hello Martin,
I did another test where the calculation within the loop looks like this: B = B + SQR(ABS(SIN(A*I))), A, B are REAL, I is INTEGER ( loop count) Timing results are: FPU ................................... time[s](interpreted)................. time[s](compiled) none...................................12.01.......................................11.37 98635..................................4.02.........................................3.38 FP200..................................2.78..........................................2.00 MF300.................................1.40..........................................0.60 68020/68882 @33MHz........0.30..........................................0.16 Some annotations: The loop overhead doesn't play a major role here; compilation yields only a tiny improvement. The effect of compilation is more relevant in the last case; there you have direct and fast coprocessor instructions ( FMULT, FDIV, FSQRT, FSIN) and an optimized processor-coprocessor interface at the hardware level; in relation to the reduced time for calculation the constant overhead for assignment, loop, saving and recalling of arguments becomes more significant. Compilation increases the file size ( sorry, I haven't got concrete figures at hand). The Infotek compiler works different from the mentioned early Visual BASIC compilers, almost the other way round: An executable wrapper around the interpreted BASIC program would not work, because under the HP BASIC operating system, there simply is no executable format ( like it is under MS-DOS), other than a "PRG", which is a tokenized BASIC program! So the Infotek compiler keeps the fundamental structure of the interpreted BASIC program and inserts machine code where it is useful. For example, Input and Output routines (like PRINT) which generally are not time-critical are left untouched. The machine code probably is inserted in so-called CSUB functions ( compiled subroutines). One positive consequence of this approach is a very high compatibility between interpreted and compiled programs. For example, event-driven loop constructs ( like ON TIMER, ON KBD ... ) all work in the compiled program as expected. Error Messages still can refer to line numbers; they are still there! Normally during compilation the source code (interpreted prg) doesn't get deleted; therefore you can list and edit the compiled program; the listing looks exactly like the original (interpreted only) version, the compiled portion is hidden, what is a little confusing IMHO. Of course it is possible to delete the source by making use of compiler switches, so that you can save space, and, probably more important, secure your program. By the way, is anyone interested in a BASIC-based(!) assembler for 200/300 machines? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)