The Word128 data type from wide-word could stand to have a builder. Doing this is a little tricky. The naive approach (repeated division by 10) will not perform well since the implementation of division for Word128 is lengthy (I'll refer to this as "super divide"). I think the best strategy is to break the Word128 into three Word64s by using super divide twice. Then each of the three words can be handled the normal way.
The
Word128data type fromwide-wordcould stand to have a builder. Doing this is a little tricky. The naive approach (repeated division by 10) will not perform well since the implementation of division forWord128is lengthy (I'll refer to this as "super divide"). I think the best strategy is to break theWord128into threeWord64s by using super divide twice. Then each of the three words can be handled the normal way.