)]}'
{
  "commit": "a7249f86ededbe739dcb29f13b31144130ceaba7",
  "tree": "5ac14eace5883602b8008ed5a19090624c4bed59",
  "parents": [
    "632cc97b5b45e6a13bbcdaf715fcff6fac289df6"
  ],
  "author": {
    "name": "Daniel Lemire",
    "email": "daniel@lemire.me",
    "time": "Sun Jun 14 01:22:10 2026"
  },
  "committer": {
    "name": "Daniel Lemire",
    "email": "daniel@lemire.me",
    "time": "Sun Jun 14 01:34:34 2026"
  },
  "message": "replace checked re-parse with O(1) simdjson-style overflow check\n\nThe previous commit detects multi-wrap u64 overflow at the max_digits\nboundary by re-parsing the digits through a checked multiply-add loop\n(O(max_digits)). Replace that with the constant-time check used in\nsimdjson: the leading digit plus a single threshold comparison.\n\nFor a max_digits-length value, min_safe_u64(base) \u003d\u003d base^(max_digits-1)\nis the smallest such value and also the width of each leading-digit band\n[d*ms, (d+1)*ms). Since that width is \u003c 2^64, the only band that can\nstraddle 2^64 is d \u003d\u003d dmax (the largest leading digit that still fits),\nand there it straddles at most once, so a single threshold dmax*ms\nseparates wrapped from non-wrapped values. A leading digit above dmax\nalways overflows; below dmax always fits. dmax and the threshold derive\nfrom the existing min_safe_u64 table, so no new tables are needed and\ndmax*ms cannot itself overflow.\n\nAdd a programmatic, self-verifying test for parse_int_string overflow\ndetection covering bases 2..36, complementing the hand-picked strings\nadded earlier. Every generated input is cross-checked against an\nindependent trusted oracle (a plain 64-bit checked multiply-add); on\nsuccess the parsed value is also compared exactly and full consumption\nof the input is asserted.\n\nPer base it exercises:\n  - an exact-boundary sweep of the 64 values straddling 2^64\n    (UINT64_MAX-31 .. 2^64+31), built by walking the digit string;\n  - UINT64_MAX, 2^64 and the all-max-digit value, each also with\n    leading zeros;\n  - random max_digits-length values across every leading digit, with\n    the heaviest sampling on the lead \u003d\u003d dmax band that straddles 2^64,\n    and full coverage of lead \u003e dmax (the multi-wrap region the naive\n    min_safe check accepted by mistake);\n  - max_digits-1 (never overflows) and max_digits+1 (always overflows).\nA small signed (int64_t) section checks the exact INT64_MIN/INT64_MAX\nlimits round-trip and that INT64_MAX+1 / INT64_MIN-1 are rejected in\nevery base.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f895e9ba3234a58c68101361dac7e409bc750f5f",
      "old_mode": 33188,
      "old_path": "include/fast_float/ascii_number.h",
      "new_id": "e6ead45bb808aa6a42e66a46351c49f1fa2cd89d",
      "new_mode": 33188,
      "new_path": "include/fast_float/ascii_number.h"
    },
    {
      "type": "modify",
      "old_id": "9762f9670f0be597b0269dbce98fc75aa8388aa6",
      "old_mode": 33188,
      "old_path": "tests/fast_int.cpp",
      "new_id": "52ad5a645825fc4aad0848d75e2acc1602c6831a",
      "new_mode": 33188,
      "new_path": "tests/fast_int.cpp"
    }
  ]
}
