)]}'
{
  "commit": "8ad15cfc69b7595c30adb417e0f07b83a3857eae",
  "tree": "74de16d458bb37c5ea0489e871ea919330397281",
  "parents": [
    "48f9fd53c6a761c619e9292675b94b860956ecfd"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Mon Nov 09 22:25:51 2026 -0600"
  },
  "committer": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Tue Nov 10 16:41:59 2026 -0600"
  },
  "message": "[subset] Binary-search avar2 offset compensation instead of budgeting it\n\nOffset compensation looked every breakpoint and estimator sample up in\nthe old segment map, the instantiated mapping and the knots by linear\nsearch, and inserted each breakpoint knot by shifting, so its cost was\nquadratic in the axis\u0027s breakpoints.  The previous commit capped that\nwith HB_BUDGET_SUBSET_TABLE; remove the quadratic work instead:\n\n- SegmentMaps::map_float() takes a sorted flag; for maps whose\n  fromCoords ascend it finds the exact-match run and the segment by\n  binary search, which lands where the linear scans do.\n- The instantiated mapping is sorted by fromCoord, and the knots by z,\n  so _avar2_map_new_mapping() and _avar2_eval_offset() binary-search.\n- The estimator pulls the ascending knots back through the mapping\n  with one forward scan over its toCoords.\n- Breakpoint knots are pushed and then sorted, keeping the first of\n  equal z as _avar2_add_knot() did.\n\nAn old segment map with fromCoords out of order, which the spec\nforbids, would still need a linear scan per lookup; for such an axis\nkeep the {-1, 0, +1, z_old} anchors and skip the estimate.\n\nRemove HB_BUDGET_SUBSET_TABLE, now unused.\n\ntest_avar2_restrict_many_breakpoints now expects the 32,769-breakpoint\naxis to instance, and to match, rather than fail; the whole test runs\nin 0.2 s.  65,000-breakpoint maps instance in under 0.25 s.\n\nOutputs are byte-identical to before for every test-subset-avar2\ninstance and for 317 random avar2 maps (sorted, with duplicate\nfromCoords, and with non-monotone toCoords) on random ranges; only\nmaps with unsorted fromCoords differ.\n\nTested: meson test -C build (277/277 OK).\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f389a9dda7af762be04db91f6feb5c0d4a351bc4",
      "old_mode": 33188,
      "old_path": "src/hb-limits.hh",
      "new_id": "e6a76afc2c3b2a5cbacbea372b45d6ce01194b08",
      "new_mode": 33188,
      "new_path": "src/hb-limits.hh"
    },
    {
      "type": "modify",
      "old_id": "d676c0086f67ff5623eca76f654f9e906b1abe6b",
      "old_mode": 33188,
      "old_path": "src/hb-ot-var-avar-table.hh",
      "new_id": "d745ef1d54d1884091005af12096ef5b3eb12652",
      "new_mode": 33188,
      "new_path": "src/hb-ot-var-avar-table.hh"
    },
    {
      "type": "modify",
      "old_id": "53a7bfc1140ce6d3e5c66447c72eaa231accc876",
      "old_mode": 33188,
      "old_path": "test/api/test-subset-avar2.c",
      "new_id": "15b87dbdc2756c81ec277e489f27aca9ded7de1a",
      "new_mode": 33188,
      "new_path": "test/api/test-subset-avar2.c"
    }
  ]
}
