|
Well maybe, but I tend to use 10I0 for all my work fields that don't require digits to the right of the decimal notation. If you're working with bigger numbers you can certainly use 20I0 and hopefully in V5R3 they will be 40i0 or 60i0 as well. Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Colin Williams Sent: Monday, February 09, 2004 3:42 PM To: RPG programming on the AS400 / iSeries Subject: Re: int vs binary questions Hans, does this mean theres a performance benefit in defining int's as 20i0 cheers Colin.W ----- Original Message ----- From: "Hans Boldt" <boldt@xxxxxxxxxx> To: <rpg400-l@xxxxxxxxxxxx> Sent: Monday, February 09, 2004 8:09 PM Subject: Re: int vs binary questions > cozzi@xxxxxxxxx wrote: > > > Hans, > > That's all well and good, but... > > 1) Why is DDS limited to 2 and 4 byte binaries and seems to use the > > RPG-like declaration for them (or has that changed?) > > 2) Why would the timing of int->int copy be slower than Bin->Bin in RPG IV > > as was reported here earlier today? > > > > > 1) DDS is NOT limited to 2 and 4 byte binaries. DDS also supports 8 byte > binaries. > > 2) Why did Steve report faster timings on bin->bin copy compared to > int->int copy? First, on a simple "EVAL B1=B2;" copy from binary to > binary where both variables have the same size, no conversion happens. > In W-Code, we do just a LOD and STR. For an assignment "EVAL I1=I2;", it > actually is a little bit more complicated. If I1 and I2 are defined as > 20I0, there's a LOD and STR which runs at around the same speed as the > binary. However, if the source argument is not 20I0, the compiler emits > a "convert to 8-byte integer" instruction first, and that tends to slow > things down a little bit. The performance difference disappears with > optimization, however. > > Cheers! Hans > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.