[libcxx-commits] [PATCH] D124122: [libc++] Optimize std::rotate

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 20 13:39:07 PDT 2022


philnik added a comment.

Here are the numbers:

  -------------------------------------------------------------------------------
  Benchmark                                                  old Time    new Time
  -------------------------------------------------------------------------------
  BM_Rotate_uint32_Random_1                                   10.6 ns     10.7 ns
  BM_Rotate_uint32_Random_4                                   24.3 ns     23.3 ns
  BM_Rotate_uint32_Random_16                                  43.7 ns     32.9 ns
  BM_Rotate_uint32_Random_64                                   116 ns     64.4 ns
  BM_Rotate_uint32_Random_256                                  423 ns      181 ns
  BM_Rotate_uint32_Random_1024                                1574 ns      612 ns
  BM_Rotate_uint32_Random_16384                              26318 ns     8900 ns
  BM_Rotate_uint32_Random_262144                            450038 ns   142255 ns
  BM_Rotate_uint64_Random_1                                   10.6 ns     10.6 ns
  BM_Rotate_uint64_Random_4                                   24.3 ns     23.2 ns
  BM_Rotate_uint64_Random_16                                  44.3 ns     34.4 ns
  BM_Rotate_uint64_Random_64                                   117 ns     67.7 ns
  BM_Rotate_uint64_Random_256                                  424 ns      193 ns
  BM_Rotate_uint64_Random_1024                                1589 ns      653 ns
  BM_Rotate_uint64_Random_16384                              26920 ns     9357 ns
  BM_Rotate_uint64_Random_262144                            460469 ns   149440 ns
  BM_Rotate_pair<uint32, uint32>_Random_1                     10.6 ns     10.7 ns
  BM_Rotate_pair<uint32, uint32>_Random_4                     23.2 ns     23.2 ns
  BM_Rotate_pair<uint32, uint32>_Random_16                    36.9 ns     35.2 ns
  BM_Rotate_pair<uint32, uint32>_Random_64                    80.7 ns     80.3 ns
  BM_Rotate_pair<uint32, uint32>_Random_256                    268 ns      268 ns
  BM_Rotate_pair<uint32, uint32>_Random_1024                  1010 ns     1009 ns
  BM_Rotate_pair<uint32, uint32>_Random_16384                15728 ns    15734 ns
  BM_Rotate_pair<uint32, uint32>_Random_262144              251816 ns   251948 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_1            10.6 ns     10.6 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_4            24.1 ns     23.7 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_16           40.1 ns     40.7 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_64            115 ns      113 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_256           412 ns      405 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_1024         1548 ns     1532 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_16384       24555 ns    23936 ns
  BM_Rotate_tuple<uint32, uint64, uint32>_Random_262144     395888 ns   386210 ns
  BM_Rotate_string_Random_1                                   10.6 ns     10.6 ns
  BM_Rotate_string_Random_4                                   48.7 ns     47.6 ns
  BM_Rotate_string_Random_16                                   124 ns      124 ns
  BM_Rotate_string_Random_64                                   288 ns      287 ns
  BM_Rotate_string_Random_256                                  756 ns      758 ns
  BM_Rotate_string_Random_1024                                2278 ns     2266 ns
  BM_Rotate_string_Random_16384                              33052 ns    32758 ns
  BM_Rotate_string_Random_262144                            533664 ns   533456 ns
  BM_Rotate_float_Random_1                                    10.6 ns     10.6 ns
  BM_Rotate_float_Random_4                                    25.2 ns     23.9 ns
  BM_Rotate_float_Random_16                                   45.3 ns     33.4 ns
  BM_Rotate_float_Random_64                                    115 ns     61.2 ns
  BM_Rotate_float_Random_256                                   424 ns      167 ns
  BM_Rotate_float_Random_1024                                 1578 ns      561 ns
  BM_Rotate_float_Random_16384                               24589 ns     8015 ns
  BM_Rotate_float_Random_262144                             409517 ns   125895 ns


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124122/new/

https://reviews.llvm.org/D124122



More information about the libcxx-commits mailing list