OSDN Git Service

Add a benchmark of strcpy.
authorChristopher Ferris <cferris@google.com>
Wed, 26 Jun 2013 20:42:18 +0000 (13:42 -0700)
committerChristopher Ferris <cferris@google.com>
Wed, 26 Jun 2013 23:04:59 +0000 (16:04 -0700)
commit8d0da52428758b7f70242841dceb1afed6145684
treecfdffe4b9fb916af9f4451ded8ef1a61cfcff3b1
parent111659ee89ecb6fc0a70c92cca81c0ee7de6c656
Add a benchmark of strcpy.

List of all changes:
- Add a strcpy benchmark.
- Create a macro that is used to create all of the code for the main
  loop of the benchmark.
- Fix the strcmp benchmark to use two buffers. The single buffer was
  an experiment that should not have been committed. It also crashes
  when a large alignment is used because it hard-coded an extra 2048
  allocation regardless of the alignment chosen.
- Modify the libc benchmarks to take the function to bench as a
  parameter. This will allow us to benchmark new potential libc
  optimizations by adding a single line to the function table list.

Merge from internal master.

(cherry-picked from commit 014cf9dc226a775e27b2e6ace2461c510d9c6c19)

Change-Id: I8848e309fa1b323fe98f4525eb0f27a889fd0a7f
micro_bench/micro_bench.cpp