3 ms·
I checked out the reference implementation and although there are some heuristics to make comparing numbers faster, you're completely right that the worst case
by windsurfer 7y ago
I checked out the reference implementation and although there are some heuristics to make comparing numbers faster, you're completely right that the worst case scenario is quite complicated: https://github.com/douglascrockford/DEC64/blob/master/dec64.asm#L1284 https://github.com/douglascrockford/DEC64/blob/master/dec64....
- bonzini 7y agoThat code is certainly not written by someone with x86 optimization experience. Using high-byte registers (e.g. ah which he rewrites as r0_h) is an awful idea on any Pentium Pro or more recent processor.
- pwdisswordfish2 7y agoAlternatively: it was written by someone with obsolete x86 optimization experience.