)]}'
{
  "commit": "99906d2063631b1dafd4263e5d37b1d928d45bbf",
  "tree": "ef9f51de3a49638cf0ecd55b68a94123aa51d8b2",
  "parents": [
    "46fb5a63ec16967c39e8388d08492b1483229c4a"
  ],
  "author": {
    "name": "Tue Ly",
    "email": "lntue@google.com",
    "time": "Thu May 11 11:10:02 2023 -0400"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue May 23 07:50:43 2023 -0700"
  },
  "message": "[libc][math] Implement double precision log2 function correctly rounded to all rounding modes.\n\nImplement double precision log2 function correctly rounded to all\nrounding modes.\n\nSee https://reviews.llvm.org/D150014 for a more detail description of the algorithm.\n\n**Performance**\n\n  - For `0.5 \u003c\u003d x \u003c\u003d 2`, the fast pass hitting rate is about 99.91%.\n\n  - Reciprocal throughput from CORE-MATH\u0027s perf tool on Ryzen 5900X:\n```\n$ ./perf.sh log2\nGNU libc version: 2.35\nGNU libc release: stable\n\n-- CORE-MATH reciprocal throughput -- with FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 15.458 + 0.204 clc/call; Median-Min \u003d 0.224 clc/call; Max \u003d 15.867 clc/call;\n\n-- CORE-MATH reciprocal throughput -- without FMA (-march\u003dx86-64-v2)\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 23.711 + 0.524 clc/call; Median-Min \u003d 0.443 clc/call; Max \u003d 25.307 clc/call;\n\n-- System LIBC reciprocal throughput --\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 14.807 + 0.199 clc/call; Median-Min \u003d 0.211 clc/call; Max \u003d 15.137 clc/call;\n\n-- LIBC reciprocal throughput -- with FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 17.666 + 0.274 clc/call; Median-Min \u003d 0.298 clc/call; Max \u003d 18.531 clc/call;\n\n-- LIBC reciprocal throughput -- without FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 26.534 + 0.418 clc/call; Median-Min \u003d 0.462 clc/call; Max \u003d 27.327 clc/call;\n\n```\n  - Latency from CORE-MATH\u0027s perf tool on Ryzen 5900X:\n```\n$ ./perf.sh log2 --latency\nGNU libc version: 2.35\nGNU libc release: stable\n\n-- CORE-MATH latency -- with FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 46.048 + 1.643 clc/call; Median-Min \u003d 1.694 clc/call; Max \u003d 48.018 clc/call;\n\n-- CORE-MATH latency -- without FMA (-march\u003dx86-64-v2)\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 62.333 + 0.138 clc/call; Median-Min \u003d 0.119 clc/call; Max \u003d 62.583 clc/call;\n\n-- System LIBC latency --\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 45.206 + 1.503 clc/call; Median-Min \u003d 1.467 clc/call; Max \u003d 47.229 clc/call;\n\n-- LIBC latency -- with FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 43.042 + 0.454 clc/call; Median-Min \u003d 0.484 clc/call; Max \u003d 43.912 clc/call;\n\n-- LIBC latency -- without FMA\n[####################] 100 %\nNtrial \u003d 20 ; Min \u003d 57.016 + 1.636 clc/call; Median-Min \u003d 1.655 clc/call; Max \u003d 58.816 clc/call;\n```\n  - Accurate pass latency:\n```\n$ ./perf.sh log2 --latency --simple_stat\nGNU libc version: 2.35\nGNU libc release: stable\n\n-- CORE-MATH latency -- with FMA\n177.632\n\n-- CORE-MATH latency -- without FMA (-march\u003dx86-64-v2)\n231.332\n\n-- LIBC latency -- with FMA\n459.751\n\n-- LIBC latency -- without FMA\n463.850\n```\n\nReviewed By: zimmermann6\n\nDifferential Revision: https://reviews.llvm.org/D150374\n\nGitOrigin-RevId: 111d27484132c0692c214880576dc4a37fd6d645\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "32f24536d38febd980407ab0009d9d801f3dc1bb",
      "old_mode": 33188,
      "old_path": "config/darwin/arm/entrypoints.txt",
      "new_id": "d5e80ef3a5ad2125af0d015c5317b622d98af071",
      "new_mode": 33188,
      "new_path": "config/darwin/arm/entrypoints.txt"
    },
    {
      "type": "modify",
      "old_id": "6d5756a72db012d26bdde93bb4d3574d78b5efae",
      "old_mode": 33188,
      "old_path": "config/linux/aarch64/entrypoints.txt",
      "new_id": "c3b2fb919d18797a7045bdc7290015dab08a262c",
      "new_mode": 33188,
      "new_path": "config/linux/aarch64/entrypoints.txt"
    },
    {
      "type": "modify",
      "old_id": "22c4e53c6b9cad7545b835c4fe0d041b54b80a0c",
      "old_mode": 33188,
      "old_path": "config/linux/x86_64/entrypoints.txt",
      "new_id": "31f8b58deee0841dd613953c960fdaae99c331ef",
      "new_mode": 33188,
      "new_path": "config/linux/x86_64/entrypoints.txt"
    },
    {
      "type": "modify",
      "old_id": "abdf444573c85ab8fc1732df275027951e113e2d",
      "old_mode": 33188,
      "old_path": "config/windows/entrypoints.txt",
      "new_id": "6df29390fffb5f0591ae1712346aab83fb5ef96d",
      "new_mode": 33188,
      "new_path": "config/windows/entrypoints.txt"
    },
    {
      "type": "modify",
      "old_id": "bae1fc5d844386f35f2164d9e71a2a018c57d9e2",
      "old_mode": 33188,
      "old_path": "spec/stdc.td",
      "new_id": "8b091b87e749a30246149f76c1098a62a6d2469b",
      "new_mode": 33188,
      "new_path": "spec/stdc.td"
    },
    {
      "type": "modify",
      "old_id": "dc5f4354b56df4a282554f995b3887a9fc6ef674",
      "old_mode": 33188,
      "old_path": "src/math/CMakeLists.txt",
      "new_id": "79d343bf797083ac5b17ae95ccaf58014d630456",
      "new_mode": 33188,
      "new_path": "src/math/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "9c784c99acf170a10264d00434f947fbeea1adc4",
      "old_mode": 33188,
      "old_path": "src/math/generic/CMakeLists.txt",
      "new_id": "3d02851f31e6d5551f81cc32c4a324ad16c69a04",
      "new_mode": 33188,
      "new_path": "src/math/generic/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7ba239b00e3f83910e7fa73915cca5f9974b6649",
      "new_mode": 33188,
      "new_path": "src/math/generic/log2.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f55ffedd15407522926c1cc5b5b83eae06a11da4",
      "new_mode": 33188,
      "new_path": "src/math/log2.h"
    },
    {
      "type": "modify",
      "old_id": "d5be52b73eb833d138ec6844903af29674db9d71",
      "old_mode": 33188,
      "old_path": "src/string/memory_utils/utils.h",
      "new_id": "f26944ca48ab73de3fa7fd0ba7cafc23ac31fdcd",
      "new_mode": 33188,
      "new_path": "src/string/memory_utils/utils.h"
    },
    {
      "type": "modify",
      "old_id": "b9711431cb94ba3dfab376d401a4c6117211e510",
      "old_mode": 33188,
      "old_path": "test/src/math/CMakeLists.txt",
      "new_id": "0fff5bde376752d973b907a75e94aab2d7451afa",
      "new_mode": 33188,
      "new_path": "test/src/math/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "01cef24581f193060466bc1d35f48ee3c5180a19",
      "new_mode": 33188,
      "new_path": "test/src/math/log2_test.cpp"
    },
    {
      "type": "modify",
      "old_id": "37d61d84c53b6fd21c62b5e6c64eff89f2847efe",
      "old_mode": 33188,
      "old_path": "test/src/string/memory_utils/utils_test.cpp",
      "new_id": "4fd6def780aa99ea338281dfc0c898ee22a3371a",
      "new_mode": 33188,
      "new_path": "test/src/string/memory_utils/utils_test.cpp"
    }
  ]
}
