Optimize convertPrintable().

I actually only came to silence sprintf() deprecation warnings, but
looking at
```
BM_log_convertPrintable_ascii               64.8 ns         64.7 ns     10837850
BM_log_convertPrintable_non_printable        247 ns          247 ns      2852322
BM_log_convertPrintable_non_ascii           6809 ns         6780 ns       100341
```
I thought we could do a lot better.

This patch replaces the sprintf() calls with manual two-digit hex
escaping (since we don't have a buffer size).

Oddly that made the "non-printable" case faster than the [printable]
"ASCII" case, so I added a __builtin_expect() to stop clang reordering
the different cases based on how complex the conditions are.

So now all three cases are faster than before:
```
BM_log_convertPrintable_ascii               56.5 ns         56.5 ns     12547408
BM_log_convertPrintable_non_printable       60.3 ns         60.3 ns     11531228
BM_log_convertPrintable_non_ascii           1542 ns         1542 ns       472010
```

Change-Id: I69e1ca3c8d0dbc831e533a166414f29be1b8dd08
1 file changed
tree: 839cb937ad80e135c990afa9b0f2255203f87063
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/
  5. rust/
  6. OWNERS
  7. PREUPLOAD.cfg
  8. TEST_MAPPING