)]}'
{
  "commit": "8e43f53c93490b078cce2e2e0ce8887c192500aa",
  "tree": "1af4d503b8326ae5f85d9a707ab2bad6d22c391a",
  "parents": [
    "e5bd2fdaa41597b24ff4e64bc92816ccdf33d314"
  ],
  "author": {
    "name": "Nick Terrell",
    "email": "terrelln@fb.com",
    "time": "Thu Oct 20 00:04:35 2022"
  },
  "committer": {
    "name": "Nick Terrell",
    "email": "terrelln@fb.com",
    "time": "Fri Oct 21 22:27:26 2022"
  },
  "message": "[lazy] Use switch instead of indirect function calls.\n\nUse a switch statement to select the search function instead of an\nindirect function call. This results in a sizable performance win.\n\nThis PR is a modification of the approach taken in PR #2828.\nWhen I measured performance for that commit, it was neutral.\nHowever, I now see a performance regression on gcc, but still\nneutral on clang. I\u0027m measuring on the same platform, but with\nnewer compilers. The new approach beats both the current dev\nbranch and the baseline before PR #2828 was merged.\n\nThis PR is necessary for Issue #3275, to update zstd in the kernel.\nWithout this PR there is a large regression in greedy - btlazy2\ncompression speed. With this PR it is about neutral.\n\ngcc version: 12.2.0\nclang version: 14.0.6\ndataset: silesia.tar\n\n| Compiler | Level | Dev Speed (MB/s) | PR Speed (MB/s) | Delta  |\n|----------|-------|------------------|-----------------|--------|\n| gcc      |     5 |            102.6 |           113.7 | +10.8% |\n| gcc      |     7 |             66.6 |            74.8 | +12.3% |\n| gcc      |     9 |             51.5 |            58.9 | +14.3% |\n| gcc      |    13 |             14.3 |            14.3 |  +0.0% |\n| clang    |     5 |            108.1 |           114.8 |  +6.2% |\n| clang    |     7 |             68.5 |            72.3 |  +5.5% |\n| clang    |     9 |             53.2 |            56.2 |  +5.6% |\n| clang    |    13 |             14.3 |            14.7 |  +2.8% |\n\nThe binary size stays just about the same for clang and gcc, measured\nusing the `size` command:\n\n| Compiler | Branch | Text    | Data | BSS | Total   |\n|----------|--------|---------|------|-----|---------|\n| gcc      | dev    | 1127950 | 3312 | 280 | 1131542 |\n| gcc      | PR     | 1123422 | 2512 | 280 | 1126214 |\n| clang    | dev    | 1046254 | 3256 | 216 | 1049726 |\n| clang    | PR     | 1048198 | 2296 | 216 | 1050710 |\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "516930c01ec9c6bfce854085fa914faa75757282",
      "old_mode": 33188,
      "old_path": "lib/common/compiler.h",
      "new_id": "413c533c4111bcc9037050f7640678f5106fb626",
      "new_mode": 33188,
      "new_path": "lib/common/compiler.h"
    },
    {
      "type": "modify",
      "old_id": "2e38dcb46d23793cc9ddcf5d25581bf0300c97f2",
      "old_mode": 33188,
      "old_path": "lib/compress/zstd_lazy.c",
      "new_id": "da4393e84abbf04b96f3ba5de9925b9ba897913f",
      "new_mode": 33188,
      "new_path": "lib/compress/zstd_lazy.c"
    }
  ]
}
