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