If a non-flash compiled program calls a flash compiled subroutine,
does the flash compiled part get called or just the interpreted code?
Basically is there then a benefit to flash compile the subroutine?
Thanks
As far as I recall (and it's been a long time).. Non-flash can only
call the non-flashed version. In general, the flashed versions are
supposed to run substantially faster. HOWEVER, that's just for
CPU-bound activities, which in general, take up very little time during
the running of an application. It's the disk I/O that's generally the
most time consumptive part. And, since hardware is always getting
faster for less money while programmer productivity may increase but at
an increasing salary, unless you have a real bottleneck, I wouldn't do
anything about it!!!
HTH!
When programs are FLASH-compiled, there are two object codes created,
the flash version and the non-flash version.
When a non-flashed program is started, it will only access the non-
flashed object code, and so everything works. (At least this is my
understanding of D3/Linux).
Likewise with starting the main program using flashed code, the
program will only access the flashed objects of subroutines. If the
flashed object is not present you get an error stating such a thing
has happened.
Note, that at least for D3/Linux, all object code is run by an
interpreter. The flash version is just optimized for speed.
Warnings: There are differences in the operation of some functions and
statements between Flash and non-flashed code. I cannot recall any
examples at this time at this time... Oh, wait... In recent memory
there was the difference in getting the command line statement in a
subroutine. It works in flash but not in non-flash.
Regards, Dale
Is there a benefit for flash compiling??? The code does operate
quicker. You can run some timings to show the differences. My test
cases show that Flashed code is about twice as fast as the regular
code.
If you are reaching the limit of your processor power flashing will be
a great help. If you are reaching the limit of your disk i/o, flashed
code will be of less help.
Do see my other email regarding calling and differences between the
two types of code.
Regards again, Dale
Generally the answer is "NO", though you can "construct" some
situations where this is not the case, and flashed code can indeed be
run by a non-flashed program (eg: a CALL dictionary item (flashed
subroutine) that is referenced via EXECUTE from a non-flashed program)
There IS a benefit to flashing compiling in terms of speed --> some
things are 10-20x faster (run your own benchmarks), BUT this comes at
the cost of reduced functionality in the debugger, plus some other
"gotchas" (eg: once you have referenced a flash-compiled subroutine,
it becomes "difficult" to reference a newer/later version without
going via TCL to reduce the use count
HTH
The code we're running definitely benefits from flash compiling as
it's a 14 second runtime without flash, and < 1 second flashed. Guess
I just have to come up with a creative way to have it executed instead
of called as a subroutine.
Why not just flash EVERYTHING!!! You can flash compile even if you
don't have source for your application via:
SELECT DICT PROG.FILE
COMPILE PROG.FILE (OW
This is a "simple" way to give your applications a "turbo boost"
HTH
I'd love to and we actually used to run a fully flashed system.
However, a couple versions back there was a bug with D3 and having
everything flashed resulted in a monthly core dump :)
Boss isn't willing to risk the stability issues on the hope that it's
been fixed so we run 1 account with flashed code (for web applications
that need the performance boost the most) and keep everything else non-
flashed.