)]}'
{
  "commit": "224f6aa73aeb73aafb05df998073ff2c7cae666f",
  "tree": "6734d2baac17117f78aea0d55bcdded1f445c833",
  "parents": [
    "98f6dd2be85d0eba8f31ee3ad1def5402383cff3"
  ],
  "author": {
    "name": "Matt Stark",
    "email": "msta@google.com",
    "time": "Thu Oct 22 08:51:25 2026 +1100"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Oct 29 17:57:59 2026 -0700"
  },
  "message": "Improve performance of escape functions.\n\nThese functions would previously do read and writes character by\ncharacter. Now we follow a different pattern:\n1) Find first character that needs to be escaped\n2) Memcpy all previous characters\n3) Write that character\n4) Repeat until no character needing to be escaped is found\n5) Memcpy all remaining characters\n\nIn the hot path, this basically looks like:\nif not any(needs_escaping(c) for c in source):\n  memcpy(source, dest)\n\nMemcpy is much faster than copying byte-by-byte, so this is much more\nperformant.\n\nThese functions now run more than twice as fast as before. Profiling\nrevealed that we spend about 4% of time in escaping, so this should be\naround a 2% performance boost (which I did measure but due to how small\nit is I couldn\u0027t get statistically significant data).\n\nChange-Id: Idaaa43263a9aec6c38effca464cc49646a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/27740\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c633fe37ece3218d98c18b1f23cdce31bb084ca",
      "old_mode": 33188,
      "old_path": "src/gn/escape.cc",
      "new_id": "8d902d49324e65c05999d2144db37a06acacfd6d",
      "new_mode": 33188,
      "new_path": "src/gn/escape.cc"
    },
    {
      "type": "modify",
      "old_id": "fd316dc3fca3451f05520f8f897fac89827a4a78",
      "old_mode": 33188,
      "old_path": "src/gn/escape.h",
      "new_id": "ce6850fa4cc198a9abdc7ea00f9e5043c5e19ce6",
      "new_mode": 33188,
      "new_path": "src/gn/escape.h"
    },
    {
      "type": "modify",
      "old_id": "dcbfd162ae261e81c5282b486dd90ea7dc97e70c",
      "old_mode": 33188,
      "old_path": "src/gn/escape_unittest.cc",
      "new_id": "62fd2e28abb2d20be8754ced8d219d4a90bd7561",
      "new_mode": 33188,
      "new_path": "src/gn/escape_unittest.cc"
    }
  ]
}
