> > Old: > > absolute minimum: 69 cycles for number 0 > > second minimum: 42300 cycles for numbers 1,2,4 and 8 > > maximum: 42797 cycles for numbers 37777 and 57777 > > Thanks for this specific info. I changed the code a bit. > The result is > 52 bytes larger and about 40% faster.
Yes, I've seen and tested it :-) But the increase in speed is not as big as we both thought. The average cycles for word were 42652 before, and are now 40340. That's only 5%. But, thinking about it, that sounds correct. There's two divisions per digit. If a digit is 0, one of the divisions is dropped, so a 0 only takes half the time of other digits. 10% of all digits are 0. Half of 10% is 5%... some absolute numbers: 0: 64 cycles 1: 25823 cycles 2,4,8: 25824 cycles 37777,57777: 42869 cycles > I think the best way to reduce code size is to add > print_universal for words (not dwords). I'm sure that shrinks the code and the execution time significantly. Greets, Kiste -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
