× 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.



Jevgeni:

Some historical background might help ...

EPM SAA C/400 was fist available with OS/400 V1R3, circa 1990 or 1991 ... it did not support the packed decimal data type directly.

ILE C/400 was first introduced with V2R3, circa 1993, and supported packed decimal data as a "native" data type right from the start.

C++ was not available on the AS/400 for several more years, and even then, when it was first available, the IBM VisualAge C++ for OS/400 compiler ran only on OS/2... it was not for several more years after that before there was a "native" C++ compiler that actually ran on OS/400.

Also, IBM's C++ compilers have never supported packed decimal as a native data type, but only via the BCD library, on any platforms, AFAIK.

Regards,

Mark S. Waterbury

> On 2/18/2015 4:32 AM, Jevgeni Astanovski wrote:
What I saw in my tests is that whatever approach you use in an attempt
to convert packed decimal in C++ to something "faster" (tried
__dectoi, QXXPTOI, cpynv) the result is exactly the same as if I make
a plain assignment of packed decimal variable value to integer (or
long long) value. So these functions provide no work around.
And at the same time I saw that ANY operation with packed decimal (or
as they call it BCD) is extremely expensive in terms of performance.
At the same time in C plain assignment is absolutely fastest of all
the ways to convert packed to int.

In this situation there are 2 things that surprise me:
1. Why IBM decided not to use the same engine for packed decimal in C
as they use in C++? What was the trade off? I mean did they gain
anything by loosing so much in performance?
2. How did it happen that noone have mentioned that earlier (at least
I googled and found no evidence that anyone new about it)?

But these questions can potentially be answered only by "insiders", I
suppose....






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.