)]}'
{
  "commit": "7527837b3b875e33bfbabdc2c68c4bd0a1a67d4d",
  "tree": "c6159df39c7a3ac9f1eb99ea6973a799a68ad484",
  "parents": [
    "1e13ccd477067cf984e4659c444497706935cda7"
  ],
  "author": {
    "name": "Sameer Agarwal",
    "email": "sameeragarwal@google.com",
    "time": "Wed Oct 21 17:06:32 2026 -0700"
  },
  "committer": {
    "name": "Sameer Agarwal",
    "email": "sameeragarwal@google.com",
    "time": "Thu Oct 22 17:07:09 2026 -0700"
  },
  "message": "Precompute scalar derivatives in Jet elementary functions\n\nCompute cbrt(f) using a single cbrt(f.a) call with f.v / (3 * r * r),\navoiding both the second cbrt evaluation and f.a * f.a overflow or\nunderflow at extreme magnitudes. Precompute the scalar derivative factor\nin erf(x) and erfc(x) using a compile-time constant for 2 / sqrt(pi)\nbefore multiplying x.v so Eigen evaluates a single scalar-vector product\ninstead of scaling x.v twice. Parenthesize (T(1.0) / log(T(10.0))) / f.a\nin log10 and (T(1.0) / log(T(2.0))) / f.a in log2 so the reciprocal\nconstant folds at compile time, and use T(0.5) / tmp in sqrt. Standardize\non floating-point T(...) constants and left-multiplication by scalar\nderivatives across elementary functions in jet.h.\n\nBenchmark (Apple M1 Pro):\n----------------------------------------------------------------------\nBenchmark                                     Before    After   Change\n----------------------------------------------------------------------\nCbrt\u003c3\u003e/1000                                 11.7 us  7.29 us   -37.7%\nCbrt\u003c10\u003e/1000                                15.9 us  11.5 us   -27.6%\nCbrt\u003c32\u003e/1000                                29.9 us  25.7 us   -14.0%\nErf\u003c3\u003e/1000                                  23.8 us  21.1 us   -11.3%\nErf\u003c32\u003e/1000                                 39.9 us  32.8 us   -17.8%\nErfc\u003c3\u003e/1000                                 23.1 us  20.2 us   -12.6%\nErfc\u003c32\u003e/1000                                39.8 us  32.7 us   -17.8%\nSqrt\u003c15\u003e/1000                                4.50 us  4.38 us    -2.7%\nSqrt\u003c32\u003e/1000                                12.5 us  12.4 us    -0.8%\n----------------------------------------------------------------------\n\nChange-Id: I2a4ceebad76cbb0eddc42be6368872a9e5543b70\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e4c96da5bd1b942597ba64d74e149362094977e5",
      "old_mode": 33188,
      "old_path": "include/ceres/constants.h",
      "new_id": "6c6442d0b9e159fd8d02ff00c1597529779e9c50",
      "new_mode": 33188,
      "new_path": "include/ceres/constants.h"
    },
    {
      "type": "modify",
      "old_id": "c5261485e4b50053460aa420cbe391c9f4b3699f",
      "old_mode": 33188,
      "old_path": "include/ceres/jet.h",
      "new_id": "312fc49428f2f6e8f5b95184218294133578719f",
      "new_mode": 33188,
      "new_path": "include/ceres/jet.h"
    },
    {
      "type": "modify",
      "old_id": "a1d2c427a1105030c6715245f48c2236f48f4d80",
      "old_mode": 33188,
      "old_path": "internal/ceres/jet_test.cc",
      "new_id": "bc982d12c53ee91cc7377323a6f991e247e2d2f9",
      "new_mode": 33188,
      "new_path": "internal/ceres/jet_test.cc"
    }
  ]
}
