platform_bionic/libc/stdio
Elliott Hughes 5305a4d4a7 10x printf speedup.
Android is UTF-8. Don't make everyone pay to convert UTF-8 to ASCII just
so we can recognize '%'. With UTF-8 we can just strchr forwards.

Before:

  ---------------------------------------------------------------
  Benchmark                        Time           CPU Iterations
  ---------------------------------------------------------------
  BM_stdio_printf_literal       1290 ns       1290 ns     442554
  BM_stdio_printf_s             1204 ns       1204 ns     582446
  BM_stdio_printf_d             1206 ns       1206 ns     578311
  BM_stdio_printf_1$s           2263 ns       2263 ns     310002

After:

  ---------------------------------------------------------------
  Benchmark                        Time           CPU Iterations
  ---------------------------------------------------------------
  BM_stdio_printf_literal        178 ns        178 ns    3394001
  BM_stdio_printf_s              246 ns        246 ns    2850284
  BM_stdio_printf_d              252 ns        252 ns    2778610
  BM_stdio_printf_1$s            363 ns        363 ns    1929011

Add missing __find_arguments error checking to the wide variant to match
the regular one.

Also replace various char/wchar_t differences with the macro.

Bug: http://b/67371539
Test: ran tests
Change-Id: I18f122009c22699943ab5d666a98ea594a972c40
2017-11-03 14:19:00 -07:00
..
fmemopen.cpp Replace fmemopen. 2017-07-24 10:48:42 -07:00
glue.h Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC. 2015-10-23 12:32:52 -07:00
local.h Start de-duplicating the regular and wide printf implementations. 2017-11-01 18:13:36 -07:00
parsefloat.c Start de-duplicating the regular and wide printf implementations. 2017-11-01 18:13:36 -07:00
refill.c More missing _unlocked <stdio.h> functions. 2017-10-31 13:23:41 -07:00
stdio.cpp More printf de-duplication. 2017-11-02 16:58:44 -07:00
stdio_ext.cpp Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
vfprintf.cpp 10x printf speedup. 2017-11-03 14:19:00 -07:00
vfscanf.c Start de-duplicating the regular and wide printf implementations. 2017-11-01 18:13:36 -07:00
vfwprintf.cpp 10x printf speedup. 2017-11-03 14:19:00 -07:00
vfwscanf.c Start de-duplicating the regular and wide printf implementations. 2017-11-01 18:13:36 -07:00
wcio.h Fix flockfile(3) and friends for stdin/stdout/stderr too. 2014-11-19 15:16:51 -08:00