use lookup table, loop unrolle to optimize itoa (integer to ascii) convertion.
original code was taken from http://www.slideshare.net/andreialexandrescu1/three-optimization-tips-for-c-15708507

benchmark code:
  unsigned i, addr=123456790;
  for (i = 0; i != 100000000; ++i) {
      sprintf(buf, "%x.%x.%x.%x",
              (addr >> 24) & 0xff,
              (addr >> 16) & 0xff,
              (addr >> 8) & 0xff,
              addr & 0xff);
  }
benchmark result:
Execution time (sec)
    original : 0.23
    built : 0.11

Speedup ratio: compare with the result of
`original' (greater is better)
built : 2.09