[PATCH] D27068: Improve string::find

Sebastian Pop via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 11:50:54 PST 2016


sebpop added a comment.

In https://reviews.llvm.org/D27068#606757, @mclow.lists wrote:

> Definitely want to see numbers.




  master:
  Benchmark                         Time           CPU Iterations
  ---------------------------------------------------------------
  BM_StringFindPhase1/10            4 ns          4 ns  161568945
  BM_StringFindPhase1/64           28 ns         28 ns   24937005
  BM_StringFindPhase1/512         132 ns        132 ns    5321432
  BM_StringFindPhase1/4k          956 ns        956 ns     732038
  BM_StringFindPhase1/32k        7622 ns       7621 ns      92121
  BM_StringFindPhase1/128k      30485 ns      30483 ns      22938
  BM_StringFindPhase2/1             4 ns          4 ns  191884173
  BM_StringFindPhase2/8             7 ns          7 ns  105129099
  BM_StringFindPhase2/64           34 ns         34 ns   20582485
  BM_StringFindPhase2/512         187 ns        187 ns    3736654
  BM_StringFindPhase2/4k         1415 ns       1414 ns     495342
  BM_StringFindPhase2/32k       11221 ns      11220 ns      62393
  BM_StringFindPhase2/128k      44952 ns      44949 ns      15595
  
  master + patch:
  Benchmark                         Time           CPU Iterations
  ---------------------------------------------------------------
  BM_StringFindPhase1/10            3 ns          3 ns  204725158
  BM_StringFindPhase1/64            5 ns          5 ns  146268957
  BM_StringFindPhase1/512          12 ns         12 ns   60176557
  BM_StringFindPhase1/4k           67 ns         67 ns   10508533
  BM_StringFindPhase1/32k         503 ns        503 ns    1000000
  BM_StringFindPhase1/128k       2396 ns       2396 ns     292701
  BM_StringFindPhase2/1             6 ns          6 ns  127378641
  BM_StringFindPhase2/8             6 ns          6 ns  117407388
  BM_StringFindPhase2/64            7 ns          7 ns   95998016
  BM_StringFindPhase2/512          18 ns         18 ns   38135928
  BM_StringFindPhase2/4k           83 ns         83 ns    8452337
  BM_StringFindPhase2/32k         762 ns        762 ns     925744
  BM_StringFindPhase2/128k       3255 ns       3255 ns     215141


https://reviews.llvm.org/D27068





More information about the cfe-commits mailing list