h2o/qrintf — pull request #9 by imasahiro (2014-11-28 05:47:45+00:00)
Title: Use lookup table and loop unrolling to optimize integer to ascii convertion

This code is about 2 times faster than original on Haswell for ipv4addr.c.

Original idea of this code was taken from http://www.slideshare.net/andreialexandrescu1/three-optimization-tips-for-c-15708507

```
$ cat /proc/cpuinfo | grep model | tail -1
model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
```

Original:
```
$ git co master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ ./bin/qrintf-gcc -O3 examples/ipv4addr.c && time ./a.out 1234567890
result: 73.150.2.210
./a.out 1234567890 0.22s user 0.00s system 99% cpu 0.219 total
```

Optimized version:
```
$ git co optimize_itoa
Switched to branch 'optimize_itoa'
Your branch is up-to-date with 'imasahiro/optimize_itoa'.
$ ./bin/qrintf-gcc -O3 examples/ipv4addr.c && time ./a.out 1234567890
result: 73.150.2.210
./a.out 1234567890 0.12s user 0.00s system 99% cpu 0.120 total
```