Jon writes:
> > Does anyone out there have experience using the OCTCOMP command to
> > create NM programs from CM programs. It seems to work but what does it
> > really do and what difference should I expect vs. a regular NM program?
...
> Every CM machine instruction can be emulated using, on the average, 8-10
> NM instructions. OCTCOMP does NOT create a Native Mode program. It
> does a lookup of the NM instructions required to do each CM instruction and
> appends this to the CM program. When the program is run the loader can
It's actually smarter than that...if a CM instruction sequence looks like:
LOAD Q-10
EXF (6:2)
LOAD Q-12
XCH , NOP
DPF (6:2)
STOR Q-12
LOAD P+4
DZRO, NOP
PCAL ?FOO
and the OCT deduces that no one appears to branch into the middle of the
above code, then the OCTCOMP will emit optimized NM code. For example,
the code it emits for the "LOAD Q-10" will simply load the value into
a register, and not push it onto the CM stack. Then, the code emitted
for the EXF will just use the register, instead of popping it from the
CM stack first.
> The performance of the OCTCOMPed program, from my experience, ranges
> from about 3-12 percent faster, if at all.
Whoa...the speed up will vary depending upon what your code is doing.
If you're spending 99.9% of the time in the operating system, you
won't see much improvement. (Indeed, it's probably possible to construct
some oddball corner case that might slow down, but I'm going to
ignore that possibility.)
However, the rule-of-thumb is that you'll be about 3 times faster.
On a 3000/968, running 5.5, I timed EDITOR (CM and OCT) doing
a "TEXT" of a 66000 line 80-byte fixed record file.
Times:
CM 18 seconds
OCT 7 seconds
Or, better than a twofold increase.
The size of the program files:
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
EDITOR PROG 128W FB 323 323 1 336 1 1
EDITORO PROG 128W FB 2300 5168 1 2512 10 16
(EDITORO is the OCT'd version)
> The resulting OCTCOMPed program file will
> generally be 4-8 times larger than the original CM program.
I'd say simply "8 times larger".
--
Stan Sieler [log in to unmask]
http://www.allegro.com/sieler.html
|