× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: RPG IV Performance
  • From: boldt@xxxxxxxxxx
  • Date: Mon, 22 Jan 2001 09:20:30 -0500
  • Importance: Normal


Jon wrote:
>Barbara or Hans can supply a more definitive answer but I believe the
>reverse of what you suggest is true.  MI instructions are as you know of
>the "Move Universe from A to B type".  W-code are of the "Move atom from
>area A to area B.  If more atoms remain at A repeat." type.  The result is
>that the actual instruction stream is significantly longer.  This would
>also explain why you see far less difference when observability is
removed.

I can't claim to know the definitive answer either, but I think
you're basically correct.  Note that the MI for an RPG III program
is stored in the object in binary form, not the text form you see
on a compile listing when compiling with GENOPT(*LIST).  I believe
you're right that this binary data stream is more compact than the
binary W-Code data stream.  For example, in RPG III, an ADD
instruction basically compiles down to ADDN and CPYNV MI
instructions, which (I believe) occupies 14 bytes in the binary MI
data stream (plus an entry in the BOMT).  The W-Code generated by
the RPG IV compiler includes LOD, LOD, ADD, and STR W-Codes which
occupy about 32 bytes in the W-Code stream, plus another 36 bytes
of other statement overhead instructions.  Part of the extra space
required is due to 4-byte integers used for operand identifiers in
W-Code versus 2-byte integers used in MI.  This also explains why
RPG IV programs can be larger than equivalent RPG III programs.

BTW, W-Code isn't quite as low-level as you suggest since a LOD
STR pair can move large data aggregates.

Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.