Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 2-char-at-a-time version of jeaiii's itoa
I originally selected the 1-char-at-a-time version based on a comment that the 2-char-at-a-time version didn't work on 32-bit and/or big endian systems. However, the author commented that "2 chars at a time should work as far as a know. If there is a system where it doesn't work, I'll help make it work." - #1618 (comment) This version is slightly faster when using my original test of `MVM_SPESH_BLOCKING=1 ./nqp-m -e 'my str $s; my int $i := 0; my $n := nqp::time; while $i++ < 10_000_000 { $s := $i }; say(nqp::div_n(nqp::time - $n, 1000000000e0)); say($s)' with the time dropping from ~0.34s to ~0.31s and instructions reported by callgrind dropping from ~4.313b to ~4.062b.
- Loading branch information