??? 12/05/05 14:25 Read: times |
#104712 - packed bcd Responding to: ???'s previous message |
Jan Waclawek said:
My "less efficient" algorithm is written almost the same as yours, except it is for the "2 digits per occurence" and is explicitly unrolled - code space inefficient, but faster.
Please can you give an example, where two digits are received per time ? Typically a key press or a received character represent only one digit. And mostly the receiving speed was slow in comparison to the conversion time, so a code size optimization seems better. But I'm not sure, if conversion of two digits to packed bcd and conversion of packed bcd to binary and multiplication by powers of 100 was really faster as my conversion per digit approach. My approach need more multiplications, but omit these two conversion steps over the intermediate packed bcd representation. Peter |