{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5707,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:57.477Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":77,"totalTokens":17911,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly, avoiding the table allocation performed by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly, avoiding the table allocation performed by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":7218,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:58.982Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":52,"totalTokens":17890,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":6010,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:57.784Z","answerBytes":150,"answerChars":150,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":58,"totalTokens":17887,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent is non-nil and refers to an entity that has not been removed.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent is non-nil and refers to an entity that has not been removed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6411,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:58.193Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":65,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback that runs when `MyAddon.Sync` arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback that runs when `MyAddon.Sync` arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":6909,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:58.840Z","answerBytes":280,"answerChars":280,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":89,"totalTokens":17919,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: copy the cached angle instead of calling Angle() again.\nlocal ang = ZERO_ANGLE * 1\n```\nReason: Copying a cached zero Angle avoids the repeated global lookup and constructor-call overhead of creating it with Angle() each time.","model_patch":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: copy the cached angle instead of calling Angle() again.\nlocal ang = ZERO_ANGLE * 1\n```\nReason: Copying a cached zero Angle avoids the repeated global lookup and constructor-call overhead of creating it with Angle() each time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9768,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:31:01.541Z","answerBytes":193,"answerChars":193,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":63,"totalTokens":17898,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal color = Color(255, 255, 255)\nlocal currentColor = color\n```\nReason: A local variable is faster to read than nested table fields because it avoids global and repeated table lookups.","model_patch":"```lua\nlocal color = Color(255, 255, 255)\nlocal currentColor = color\n```\nReason: A local variable is faster to read than nested table fields because it avoids global and repeated table lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6676,"startedAt":"2026-07-11T07:30:51.752Z","completedAt":"2026-07-11T07:30:58.582Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":73,"totalTokens":17904,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job value through its DarkRPVar API, so use `getDarkRPVar(\"job\")` instead of reading the underlying networked string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job value through its DarkRPVar API, so use `getDarkRPVar(\"job\")` instead of reading the underlying networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8511,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:31:00.289Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":66,"totalTokens":17896,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: DistToSqr avoids the square root required for actual distance, making threshold comparisons faster.","model_patch":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: DistToSqr avoids the square root required for actual distance, making threshold comparisons faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7425,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:59.214Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":66,"totalTokens":17896,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent here\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to visit every entity without creating the intermediate table returned by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent here\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to visit every entity without creating the intermediate table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6059,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:57.885Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17847,"completionTokens":62,"totalTokens":17909,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: ents.FindInSphere is a fast built-in spatial query for radius-based proximity checks and avoids scanning every entity in Lua.","model_patch":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: ents.FindInSphere is a fast built-in spatial query for radius-based proximity checks and avoids scanning every entity in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7744,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:59.536Z","answerBytes":473,"answerChars":473,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":138,"totalTokens":17979,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSquared = radius * radius\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(position) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating `player.GetAll()` checks only players, and `DistToSqr` avoids the square root and the larger entity scan performed by `ents.FindInSphere`.","model_patch":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSquared = radius * radius\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(position) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating `player.GetAll()` checks only players, and `DistToSqr` avoids the square root and the larger entity scan performed by `ents.FindInSphere`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6459,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:58.361Z","answerBytes":180,"answerChars":180,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":71,"totalTokens":17905,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a simple while loop is generally faster than a numeric for loop for tight counting.","model_patch":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a simple while loop is generally faster than a numeric for loop for tight counting."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6399,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:58.194Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17844,"completionTokens":65,"totalTokens":17909,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyPlayers\", function()\n    hook.Run(\"NotifyCustomLogic\", player.GetAll())\nend)\n```\nReason: One hook.Run per tick avoids repeated hook dispatch overhead for every player.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyPlayers\", function()\n    hook.Run(\"NotifyCustomLogic\", player.GetAll())\nend)\n```\nReason: One hook.Run per tick avoids repeated hook dispatch overhead for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7288,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:59.091Z","answerBytes":358,"answerChars":358,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":120,"totalTokens":17957,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant LocalPlayer() lookups and Health() method calls.","model_patch":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant LocalPlayer() lookups and Health() method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6674,"startedAt":"2026-07-11T07:30:51.753Z","completedAt":"2026-07-11T07:30:58.474Z","answerBytes":209,"answerChars":209,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17827,"completionTokens":75,"totalTokens":17902,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, #items do\n    drawItem(items[i], white)\nend\n```\nReason: Create the Color once outside the hot loop to avoid repeated table allocation and constructor work.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, #items do\n    drawItem(items[i], white)\nend\n```\nReason: Create the Color once outside the hot loop to avoid repeated table allocation and constructor work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6156,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:30:58.192Z","answerBytes":176,"answerChars":176,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":68,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8928,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:31:00.971Z","answerBytes":437,"answerChars":437,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":120,"totalTokens":17950,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if IsValid(localPlayer) then\n        -- Use localPlayer here instead of calling LocalPlayer() repeatedly.\n    end\nend)\n```\nReason: Caching the player in a local variable after entities initialize avoids repeated global function calls and LocalPlayer lookups.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if IsValid(localPlayer) then\n        -- Use localPlayer here instead of calling LocalPlayer() repeatedly.\n    end\nend)\n```\nReason: Caching the player in a local variable after entities initialize avoids repeated global function calls and LocalPlayer lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":15649,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:31:07.710Z","answerBytes":460,"answerChars":460,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":261,"totalTokens":18107,"reasoningTokens":121,"cachedTokens":0},"finalResponse":"```lua\nlocal FACE_DOT = 0.8 -- Higher means stricter alignment.\n\nlocal function AreRoughlyLookingAtEachOther(a, b)\n    local direction = b:EyePos() - a:EyePos()\n    direction:Normalize()\n\n    return a:GetAimVector():Dot(direction) >= FACE_DOT\n       and b:GetAimVector():Dot(direction) <= -FACE_DOT\nend\n```\nReason: Dot products compare both aim vectors against one normalized player-to-player direction, avoiding the cost of `math.acos` and angle construction.","model_patch":"```lua\nlocal FACE_DOT = 0.8 -- Higher means stricter alignment.\n\nlocal function AreRoughlyLookingAtEachOther(a, b)\n    local direction = b:EyePos() - a:EyePos()\n    direction:Normalize()\n\n    return a:GetAimVector():Dot(direction) >= FACE_DOT\n       and b:GetAimVector():Dot(direction) <= -FACE_DOT\nend\n```\nReason: Dot products compare both aim vectors against one normalized player-to-player direction, avoiding the cost of `math.acos` and angle construction."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6426,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:30:58.478Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":55,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: It generally avoids the metatable method lookup that `ply:SomeHelper()` requires, so a controlled helper is usually marginally faster.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: It generally avoids the metatable method lookup that `ply:SomeHelper()` requires, so a controlled helper is usually marginally faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7830,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:30:59.909Z","answerBytes":150,"answerChars":150,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":49,"totalTokens":17880,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes directly to the console without print's extra argument formatting and tab-separated output handling.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes directly to the console without print's extra argument formatting and tab-separated output handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7288,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:30:59.410Z","answerBytes":215,"answerChars":215,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":69,"totalTokens":17906,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric for typically has the least iterator overhead for a dense sequential array, making it faster than ipairs and pairs.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric for typically has the least iterator overhead for a dense sequential array, making it faster than ipairs and pairs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7794,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:30:59.908Z","answerBytes":344,"answerChars":344,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":109,"totalTokens":17958,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal result = {}\nlocal resultCount = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isAlive() then\n        resultCount = resultCount + 1\n        result[resultCount] = ply:Nick()\n    end\nend\n```\nReason: One plain loop fuses filtering and mapping, avoiding fn combinator calls, intermediate tables, and extra allocations.","model_patch":"```lua\nlocal result = {}\nlocal resultCount = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isAlive() then\n        resultCount = resultCount + 1\n        result[resultCount] = ply:Nick()\n    end\nend\n```\nReason: One plain loop fuses filtering and mapping, avoiding fn combinator calls, intermediate tables, and extra allocations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8482,"startedAt":"2026-07-11T07:30:51.754Z","completedAt":"2026-07-11T07:31:00.290Z","answerBytes":922,"answerChars":922,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17850,"completionTokens":242,"totalTokens":18092,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nlocal function rebuildPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"BuildPlayerCache\", rebuildPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", rebuildPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(leavingPlayer)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == leavingPlayer then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        if IsValid(ply) then\n            -- Per-player tick work.\n        end\n    end\nend)\n```\nReason: The tick path reuses one cached array, avoiding a fresh player.GetAll() result and ipairs iterator setup every tick while join and leave hooks keep membership current.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nlocal function rebuildPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"BuildPlayerCache\", rebuildPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", rebuildPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(leavingPlayer)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == leavingPlayer then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        if IsValid(ply) then\n            -- Per-player tick work.\n        end\n    end\nend)\n```\nReason: The tick path reuses one cached array, avoiding a fresh player.GetAll() result and ipairs iterator setup every tick while join and leave hooks keep membership current."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12016,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:31:03.900Z","answerBytes":282,"answerChars":280,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":209,"totalTokens":18042,"reasoningTokens":124,"cachedTokens":0},"finalResponse":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nplayerData[ply] = value\nlocal value = playerData[ply]\n```\nReason: Reading a local Lua table avoids the Player userdata’s metatable lookup, while weak keys automatically release entries after players become unreachable.","model_patch":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nplayerData[ply] = value\nlocal value = playerData[ply]\n```\nReason: Reading a local Lua table avoids the Player userdata’s metatable lookup, while weak keys automatically release entries after players become unreachable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8052,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:30:59.902Z","answerBytes":236,"answerChars":236,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":78,"totalTokens":17914,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Sequential number-indexed arrays support faster numeric iteration than string-keyed maps, avoiding hash-key traversal.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Sequential number-indexed arrays support faster numeric iteration than string-keyed maps, avoiding hash-key traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8010,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:30:59.907Z","answerBytes":167,"answerChars":167,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":58,"totalTokens":17897,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate numeric channels avoids Color object creation and table field lookups in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate numeric channels avoids Color object creation and table field lookups in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5729,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:30:57.588Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17857,"completionTokens":67,"totalTokens":17924,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8915,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:31:00.970Z","answerBytes":413,"answerChars":413,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":185,"totalTokens":18015,"reasoningTokens":57,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: A weak-key cache calls `SteamID()` once per player entity and automatically releases entries after disconnected player entities are collected.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: A weak-key cache calls `SteamID()` once per player entity and automatically releases entries after disconnected player entities are collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":7907,"startedAt":"2026-07-11T07:30:51.755Z","completedAt":"2026-07-11T07:30:59.906Z","answerBytes":271,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":90,"totalTokens":17919,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = tostring(i)\nend\n\nlocal result = table.concat(pieces)\n```\nReason: `table.concat` joins the pieces in one pass, avoiding the repeated allocations and copying caused by growing a string with `..` inside the loop.","model_patch":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = tostring(i)\nend\n\nlocal result = table.concat(pieces)\n```\nReason: `table.concat` joins the pieces in one pass, avoiding the repeated allocations and copying caused by growing a string with `..` inside the loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6593,"startedAt":"2026-07-11T07:30:51.756Z","completedAt":"2026-07-11T07:30:58.660Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":66,"totalTokens":17901,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12649,"startedAt":"2026-07-11T07:30:51.756Z","completedAt":"2026-07-11T07:31:04.517Z","answerBytes":318,"answerChars":318,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":101,"totalTokens":17935,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Fast single-line text\")\n```\nReason: Direct surface.SetTextPos plus surface.DrawText avoids the extra alignment, newline, and outline work performed by draw.DrawText and draw.SimpleTextOutlined.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Fast single-line text\")\n```\nReason: Direct surface.SetTextPos plus surface.DrawText avoids the extra alignment, newline, and outline work performed by draw.DrawText and draw.SimpleTextOutlined."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4697,"startedAt":"2026-07-11T07:30:51.756Z","completedAt":"2026-07-11T07:30:56.511Z","answerBytes":129,"answerChars":129,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":46,"totalTokens":17872,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal length = #tbl\n```\nReason: The length operator is the preferred way to get the size of a sequential array-like table.","model_patch":"```lua\nlocal length = #tbl\n```\nReason: The length operator is the preferred way to get the size of a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5135,"startedAt":"2026-07-11T07:30:56.513Z","completedAt":"2026-07-11T07:31:01.652Z","answerBytes":195,"answerChars":195,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":58,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding to a new empty table is generally faster than iterating through the old table to remove every entry, provided no other references need that same table emptied.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding to a new empty table is generally faster than iterating through the old table to remove every entry, provided no other references need that same table emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4951,"startedAt":"2026-07-11T07:30:57.581Z","completedAt":"2026-07-11T07:31:02.570Z","answerBytes":232,"answerChars":232,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":87,"totalTokens":17920,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal set = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif set[value] then\n    -- value exists\nend\n```\nReason: A keyed set uses an average O(1) table lookup, while table.HasValue scans the list in O(n) time.","model_patch":"```lua\nlocal set = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif set[value] then\n    -- value exists\nend\n```\nReason: A keyed set uses an average O(1) table lookup, while table.HasValue scans the list in O(n) time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6188,"startedAt":"2026-07-11T07:30:57.618Z","completedAt":"2026-07-11T07:31:03.955Z","answerBytes":262,"answerChars":262,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":76,"totalTokens":17908,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal playerData = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and initializes the table in one operation instead of performing separate field assignments.","model_patch":"```lua\nlocal playerData = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and initializes the table in one operation instead of performing separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5112,"startedAt":"2026-07-11T07:30:57.800Z","completedAt":"2026-07-11T07:31:02.915Z","answerBytes":153,"answerChars":153,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":50,"totalTokens":17878,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's key iteration overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's key iteration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7126,"startedAt":"2026-07-11T07:30:57.961Z","completedAt":"2026-07-11T07:31:05.379Z","answerBytes":119,"answerChars":119,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17823,"completionTokens":44,"totalTokens":17867,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the preferred fast form for squaring in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the preferred fast form for squaring in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-sol@low","model_name_or_path":"gpt-5.6-sol@low","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":6572,"startedAt":"2026-07-11T07:30:58.217Z","completedAt":"2026-07-11T07:31:04.871Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":61,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each currently connected player directly without creating the table returned by `player.GetAll()`.","model_patch":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each currently connected player directly without creating the table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5163,"startedAt":"2026-07-11T07:30:58.234Z","completedAt":"2026-07-11T07:31:03.559Z","answerBytes":249,"answerChars":249,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":78,"totalTokens":17910,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly without first allocating the full table returned by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly without first allocating the full table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":6100,"startedAt":"2026-07-11T07:30:58.242Z","completedAt":"2026-07-11T07:31:04.504Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":52,"totalTokens":17886,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":6494,"startedAt":"2026-07-11T07:30:58.472Z","completedAt":"2026-07-11T07:31:05.064Z","answerBytes":147,"answerChars":147,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":55,"totalTokens":17884,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent exists and has not been removed before a method is called.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent exists and has not been removed before a method is called."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4868,"startedAt":"2026-07-11T07:30:58.539Z","completedAt":"2026-07-11T07:31:03.457Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":62,"totalTokens":17886,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: net.Receive registers the callback that runs when MyAddon.Sync is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: net.Receive registers the callback that runs when MyAddon.Sync is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":6207,"startedAt":"2026-07-11T07:30:58.552Z","completedAt":"2026-07-11T07:31:04.790Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":74,"totalTokens":17904,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- Hot path:\nlocal ang = ZERO_ANGLE\n```\nReason: Reusing Garry's Mod's built-in immutable-by-convention `angle_zero` avoids allocating and initializing a new `Angle()` userdata on every call.","model_patch":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- Hot path:\nlocal ang = ZERO_ANGLE\n```\nReason: Reusing Garry's Mod's built-in immutable-by-convention `angle_zero` avoids allocating and initializing a new `Angle()` userdata on every call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5569,"startedAt":"2026-07-11T07:30:58.641Z","completedAt":"2026-07-11T07:31:04.281Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":60,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable is faster to read because it avoids global and nested table lookups.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable is faster to read because it avoids global and nested table lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5360,"startedAt":"2026-07-11T07:30:58.801Z","completedAt":"2026-07-11T07:31:04.388Z","answerBytes":214,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":67,"totalTokens":17896,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP job data is exposed through `getDarkRPVar`; using it preserves DarkRP’s data contract instead of reading the underlying networked string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP job data is exposed through `getDarkRPVar`; using it preserves DarkRP’s data contract instead of reading the underlying networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5901,"startedAt":"2026-07-11T07:30:58.962Z","completedAt":"2026-07-11T07:31:05.101Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":66,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square-root calculation required for actual distance.","model_patch":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square-root calculation required for actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5437,"startedAt":"2026-07-11T07:30:59.134Z","completedAt":"2026-07-11T07:31:04.824Z","answerBytes":231,"answerChars":231,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":68,"totalTokens":17894,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent\nend\n```\nReason: `ents.Iterator()` visits every entity without first allocating the table returned by `ents.GetAll()`, making it the efficient choice when only iteration is needed.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent\nend\n```\nReason: `ents.Iterator()` visits every entity without first allocating the table returned by `ents.GetAll()`, making it the efficient choice when only iteration is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6838,"startedAt":"2026-07-11T07:30:59.189Z","completedAt":"2026-07-11T07:31:06.279Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17847,"completionTokens":59,"totalTokens":17906,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query that directly returns entities within a radius.","model_patch":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query that directly returns entities within a radius."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13493,"startedAt":"2026-07-11T07:30:59.338Z","completedAt":"2026-07-11T07:31:13.158Z","answerBytes":439,"answerChars":439,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":209,"totalTokens":18050,"reasoningTokens":83,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSqr = radius * radius\n\n    for _, ply in player.Iterator() do\n        if position:DistToSqr(ply:GetPos()) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating players directly avoids scanning unrelated entities, and squared-distance checks avoid a square root for every player.","model_patch":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSqr = radius * radius\n\n    for _, ply in player.Iterator() do\n        if position:DistToSqr(ply:GetPos()) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating players directly avoids scanning unrelated entities, and squared-distance checks avoid a square root for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6083,"startedAt":"2026-07-11T07:30:59.604Z","completedAt":"2026-07-11T07:31:06.002Z","answerBytes":181,"answerChars":181,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":71,"totalTokens":17905,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a numeric while loop is generally faster than a numeric for loop for tight counting.","model_patch":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a numeric while loop is generally faster than a numeric for loop for tight counting."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6061,"startedAt":"2026-07-11T07:30:59.641Z","completedAt":"2026-07-11T07:31:06.278Z","answerBytes":250,"answerChars":250,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":74,"totalTokens":17916,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n```\nReason: One hook.Run call per tick avoids repeated hook dispatch overhead; listeners can loop over the supplied player list themselves.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n```\nReason: One hook.Run call per tick avoids repeated hook dispatch overhead; listeners can loop over the supplied player list themselves."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8245,"startedAt":"2026-07-11T07:30:59.912Z","completedAt":"2026-07-11T07:31:08.565Z","answerBytes":358,"answerChars":358,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":120,"totalTokens":17957,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 10, 10, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 10, 30, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 10, 50, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant LocalPlayer() lookups and Health() method calls.","model_patch":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 10, 10, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 10, 30, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 10, 50, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant LocalPlayer() lookups and Health() method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12231,"startedAt":"2026-07-11T07:30:59.914Z","completedAt":"2026-07-11T07:31:12.587Z","answerBytes":210,"answerChars":210,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":74,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, count do\n    drawItem(i, white)\nend\n```\nReason: Creating the color once outside the paint loop avoids repeated table allocation and garbage-collection work.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, count do\n    drawItem(i, white)\nend\n```\nReason: Creating the color once outside the paint loop avoids repeated table allocation and garbage-collection work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5599,"startedAt":"2026-07-11T07:30:59.915Z","completedAt":"2026-07-11T07:31:06.010Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":69,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13376,"startedAt":"2026-07-11T07:30:59.915Z","completedAt":"2026-07-11T07:31:13.850Z","answerBytes":318,"answerChars":318,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":278,"totalTokens":18108,"reasoningTokens":184,"cachedTokens":0},"finalResponse":"```lua\nlocal localPlayer = LocalPlayer()\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nlocal function GetLocalPlayer()\n    return localPlayer\nend\n```\nReason: Cache the player once after client entities initialize, so hot-path calls become a cheap local-variable read.","model_patch":"```lua\nlocal localPlayer = LocalPlayer()\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nlocal function GetLocalPlayer()\n    return localPlayer\nend\n```\nReason: Cache the player once after client entities initialize, so hot-path calls become a cheap local-variable read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14034,"startedAt":"2026-07-11T07:30:59.918Z","completedAt":"2026-07-11T07:31:15.022Z","answerBytes":504,"answerChars":504,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":254,"totalTokens":18100,"reasoningTokens":105,"cachedTokens":17152},"finalResponse":"```lua\nlocal FACE_DOT = 0.8 -- roughly within 37 degrees\n\nlocal function AreLookingAtEachOther(a, b)\n    local offset = b:EyePos() - a:EyePos()\n    if offset:IsZero() then return false end\n\n    local direction = offset:GetNormalized()\n    return a:GetAimVector():Dot(direction) >= FACE_DOT\n       and b:GetAimVector():Dot(-direction) >= FACE_DOT\nend\n```\nReason: Dot products compare alignment directly against a precomputed cosine threshold, avoiding the extra cost of `math.acos` and angle construction.","model_patch":"```lua\nlocal FACE_DOT = 0.8 -- roughly within 37 degrees\n\nlocal function AreLookingAtEachOther(a, b)\n    local offset = b:EyePos() - a:EyePos()\n    if offset:IsZero() then return false end\n\n    local direction = offset:GetNormalized()\n    return a:GetAimVector():Dot(direction) >= FACE_DOT\n       and b:GetAimVector():Dot(-direction) >= FACE_DOT\nend\n```\nReason: Dot products compare alignment directly against a precomputed cosine threshold, avoiding the extra cost of `math.acos` and angle construction."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5766,"startedAt":"2026-07-11T07:31:00.411Z","completedAt":"2026-07-11T07:31:06.764Z","answerBytes":166,"answerChars":166,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":53,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: It is generally faster because it avoids metatable method lookup and passes `ply` directly, though the difference is usually small.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: It is generally faster because it avoids metatable method lookup and passes `ply` directly, though the difference is usually small."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6432,"startedAt":"2026-07-11T07:31:00.938Z","completedAt":"2026-07-11T07:31:07.425Z","answerBytes":129,"answerChars":129,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":74,"totalTokens":17905,"reasoningTokens":27,"cachedTokens":17152},"finalResponse":"```lua\nMsg(\"debug line\\n\")\n```\nReason: Msg writes the string directly without print's argument formatting and separator handling.","model_patch":"```lua\nMsg(\"debug line\\n\")\n```\nReason: Msg writes the string directly without print's argument formatting and separator handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6170,"startedAt":"2026-07-11T07:31:01.004Z","completedAt":"2026-07-11T07:31:07.177Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":65,"totalTokens":17904,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\nend\n```\nReason: Numeric for typically has the least iterator overhead for a large dense sequential table, making it faster than ipairs and pairs.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\nend\n```\nReason: Numeric for typically has the least iterator overhead for a large dense sequential table, making it faster than ipairs and pairs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7224,"startedAt":"2026-07-11T07:31:01.004Z","completedAt":"2026-07-11T07:31:08.237Z","answerBytes":334,"answerChars":334,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":151,"totalTokens":18000,"reasoningTokens":42,"cachedTokens":17152},"finalResponse":"```lua\nlocal output = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isArrested() then\n        count = count + 1\n        output[count] = ply:Nick()\n    end\nend\n```\nReason: One fused numeric loop avoids fn combinator callbacks and intermediate tables while producing the same filtered-and-mapped list.","model_patch":"```lua\nlocal output = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isArrested() then\n        count = count + 1\n        output[count] = ply:Nick()\n    end\nend\n```\nReason: One fused numeric loop avoids fn combinator callbacks and intermediate tables while producing the same filtered-and-mapped list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9220,"startedAt":"2026-07-11T07:31:01.651Z","completedAt":"2026-07-11T07:31:11.046Z","answerBytes":937,"answerChars":937,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17850,"completionTokens":242,"totalTokens":18092,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"RefreshPlayerCache\", refreshPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(leavingPlayer)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == leavingPlayer then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: This avoids rebuilding the player list every tick; joins refresh the snapshot, leaves remove the departing player immediately, and the hot loop uses a numeric array traversal.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"RefreshPlayerCache\", refreshPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(leavingPlayer)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == leavingPlayer then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: This avoids rebuilding the player list every tick; joins refresh the snapshot, leaves remove the departing player immediately, and the hot loop uses a numeric array traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8710,"startedAt":"2026-07-11T07:31:01.773Z","completedAt":"2026-07-11T07:31:10.675Z","answerBytes":364,"answerChars":364,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":181,"totalTokens":18014,"reasoningTokens":70,"cachedTokens":0},"finalResponse":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTemporaryData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function GetTemporaryData(ply)\n    return playerData[ply]\nend\n```\nReason: A local Lua table keyed by player avoids repeated userdata/metatable field lookup, while weak keys let disconnected players be garbage-collected.","model_patch":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTemporaryData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function GetTemporaryData(ply)\n    return playerData[ply]\nend\n```\nReason: A local Lua table keyed by player avoids repeated userdata/metatable field lookup, while weak keys let disconnected players be garbage-collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5913,"startedAt":"2026-07-11T07:31:02.643Z","completedAt":"2026-07-11T07:31:08.744Z","answerBytes":261,"answerChars":261,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":85,"totalTokens":17921,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Sequential number-indexed arrays support faster numeric iteration than string-keyed maps and avoid the overhead of `pairs` and hash-key lookup.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Sequential number-indexed arrays support faster numeric iteration than string-keyed maps and avoid the overhead of `pairs` and hash-key lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6099,"startedAt":"2026-07-11T07:31:02.916Z","completedAt":"2026-07-11T07:31:09.019Z","answerBytes":155,"answerChars":155,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":81,"totalTokens":17920,"reasoningTokens":21,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate RGBA numbers avoids the Color-object overload and is faster on a hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate RGBA numbers avoids the Color-object overload and is faster on a hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12551,"startedAt":"2026-07-11T07:31:03.535Z","completedAt":"2026-07-11T07:31:16.136Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17855,"completionTokens":70,"totalTokens":17925,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal row = sql.QueryRow(\"SELECT credits FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite typically has lower latency because it avoids network round trips to a remote MySQL server.","model_patch":"```lua\nlocal row = sql.QueryRow(\"SELECT credits FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite typically has lower latency because it avoids network round trips to a remote MySQL server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23290,"startedAt":"2026-07-11T07:31:03.589Z","completedAt":"2026-07-11T07:31:26.880Z","answerBytes":387,"answerChars":387,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":298,"totalTokens":18126,"reasoningTokens":174,"cachedTokens":17152},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetCachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: Weak player keys avoid retaining disconnected players, while each live player's SteamID is computed only once.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetCachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: Weak player keys avoid retaining disconnected players, while each live player's SteamID is computed only once."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12106,"startedAt":"2026-07-11T07:31:03.917Z","completedAt":"2026-07-11T07:31:16.131Z","answerBytes":238,"answerChars":238,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":81,"totalTokens":17910,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = \"piece \" .. i\nend\n\nlocal result = table.concat(pieces)\n```\nReason: Collecting pieces in a table and joining once with table.concat avoids repeatedly copying the growing string.","model_patch":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = \"piece \" .. i\nend\n\nlocal result = table.concat(pieces)\n```\nReason: Collecting pieces in a table and joining once with table.concat avoids repeatedly copying the growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8665,"startedAt":"2026-07-11T07:31:03.993Z","completedAt":"2026-07-11T07:31:12.787Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":66,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18927,"startedAt":"2026-07-11T07:31:04.386Z","completedAt":"2026-07-11T07:31:23.375Z","answerBytes":338,"answerChars":338,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":171,"totalTokens":18005,"reasoningTokens":59,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Fast single-line text\")\n```\nReason: `surface.DrawText` is the leanest direct helper for one line; `draw.DrawText` adds multiline handling, while `draw.SimpleTextOutlined` performs extra draw calls for the outline.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Fast single-line text\")\n```\nReason: `surface.DrawText` is the leanest direct helper for one line; `draw.DrawText` adds multiline handling, while `draw.SimpleTextOutlined` performs extra draw calls for the outline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11871,"startedAt":"2026-07-11T07:31:04.447Z","completedAt":"2026-07-11T07:31:16.426Z","answerBytes":133,"answerChars":133,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":45,"totalTokens":17873,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal length = #array\n```\nReason: The length operator is the idiomatic and efficient choice for a sequential array-like table.","model_patch":"```lua\nlocal length = #array\n```\nReason: The length operator is the idiomatic and efficient choice for a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12977,"startedAt":"2026-07-11T07:31:04.545Z","completedAt":"2026-07-11T07:31:17.630Z","answerBytes":231,"answerChars":231,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":68,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding to a new table is generally faster because it avoids iterating over and deleting every entry as table.Empty(t) does; use table.Empty(t) only when other references must see the same table cleared.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding to a new table is generally faster because it avoids iterating over and deleting every entry as table.Empty(t) does; use table.Empty(t) only when other references must see the same table cleared."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13147,"startedAt":"2026-07-11T07:31:04.612Z","completedAt":"2026-07-11T07:31:17.806Z","answerBytes":259,"answerChars":259,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":94,"totalTokens":17923,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal valueSet = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif valueSet[targetValue] then\n    -- Value exists in the set.\nend\n```\nReason: A keyed set uses an average O(1) table lookup, while table.HasValue scans the list in O(n) time.","model_patch":"```lua\nlocal valueSet = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif valueSet[targetValue] then\n    -- Value exists in the set.\nend\n```\nReason: A keyed set uses an average O(1) table lookup, while table.HasValue scans the list in O(n) time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12093,"startedAt":"2026-07-11T07:31:04.870Z","completedAt":"2026-07-11T07:31:17.115Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":68,"totalTokens":17898,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal data = {\n    name = \"example\",\n    enabled = true,\n    count = 3,\n}\n```\nReason: Putting known fields directly in the table constructor avoids separate field-assignment operations and is typically faster.","model_patch":"```lua\nlocal data = {\n    name = \"example\",\n    enabled = true,\n    count = 3,\n}\n```\nReason: Putting known fields directly in the table constructor avoids separate field-assignment operations and is typically faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13541,"startedAt":"2026-07-11T07:31:04.908Z","completedAt":"2026-07-11T07:31:18.630Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":54,"totalTokens":17882,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: For a sequential table, direct random indexing avoids table.Random's generic key iteration and is therefore faster.","model_patch":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: For a sequential table, direct random indexing avoids table.Random's generic key iteration and is therefore faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13204,"startedAt":"2026-07-11T07:31:04.950Z","completedAt":"2026-07-11T07:31:18.306Z","answerBytes":134,"answerChars":134,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":44,"totalTokens":17869,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids exponentiation overhead and is typically faster in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids exponentiation overhead and is typically faster in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-sol@medium","model_name_or_path":"gpt-5.6-sol@medium","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":13715,"startedAt":"2026-07-11T07:31:05.107Z","completedAt":"2026-07-11T07:31:18.826Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":103,"totalTokens":17944,"reasoningTokens":40,"cachedTokens":0},"finalResponse":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each connected player directly without creating the temporary table returned by `player.GetAll()`.","model_patch":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each connected player directly without creating the temporary table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15919,"startedAt":"2026-07-11T07:31:05.108Z","completedAt":"2026-07-11T07:31:21.036Z","answerBytes":238,"answerChars":238,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":138,"totalTokens":17968,"reasoningTokens":63,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly without first allocating a table containing every entity.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly without first allocating a table containing every entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":12961,"startedAt":"2026-07-11T07:31:05.404Z","completedAt":"2026-07-11T07:31:18.420Z","answerBytes":141,"answerChars":141,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":51,"totalTokens":17885,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs on every Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs on every Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":13901,"startedAt":"2026-07-11T07:31:06.009Z","completedAt":"2026-07-11T07:31:19.925Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":55,"totalTokens":17888,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent exists and has not been removed before its methods are called.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid checks that ent exists and has not been removed before its methods are called."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13057,"startedAt":"2026-07-11T07:31:06.022Z","completedAt":"2026-07-11T07:31:19.209Z","answerBytes":221,"answerChars":221,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17822,"completionTokens":66,"totalTokens":17888,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming message here.\nend)\n```\nReason: net.Receive registers the callback that runs whenever a net message with the specified name arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming message here.\nend)\n```\nReason: net.Receive registers the callback that runs whenever a net message with the specified name arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":7412,"startedAt":"2026-07-11T07:31:06.353Z","completedAt":"2026-07-11T07:31:13.943Z","answerBytes":206,"answerChars":206,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":126,"totalTokens":17958,"reasoningTokens":59,"cachedTokens":0},"finalResponse":"```lua\nlocal zeroAngle = angle_zero -- Reuse; do not mutate this shared Angle.\n```\nReason: Reusing the engine-provided `angle_zero` avoids allocating and constructing a new `Angle()` on every hot-path call.","model_patch":"```lua\nlocal zeroAngle = angle_zero -- Reuse; do not mutate this shared Angle.\n```\nReason: Reusing the engine-provided `angle_zero` avoids allocating and constructing a new `Angle()` on every hot-path call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13837,"startedAt":"2026-07-11T07:31:06.385Z","completedAt":"2026-07-11T07:31:20.316Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":60,"totalTokens":17895,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable is faster to read because it avoids global and nested table lookups.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable is faster to read because it avoids global and nested table lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14504,"startedAt":"2026-07-11T07:31:06.833Z","completedAt":"2026-07-11T07:31:21.427Z","answerBytes":185,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":60,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job variable, so use its accessor instead of reading the underlying networked value directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job variable, so use its accessor instead of reading the underlying networked value directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13324,"startedAt":"2026-07-11T07:31:07.179Z","completedAt":"2026-07-11T07:31:20.505Z","answerBytes":175,"answerChars":175,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":62,"totalTokens":17894,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: DistToSqr avoids the square-root calculation required for actual distance.","model_patch":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: DistToSqr avoids the square-root calculation required for actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12533,"startedAt":"2026-07-11T07:31:07.439Z","completedAt":"2026-07-11T07:31:20.059Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":66,"totalTokens":17892,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor entity in ents.Iterator() do\n    -- Use entity\nend\n```\nReason: `ents.Iterator()` visits every entity without allocating the intermediate table returned by `ents.GetAll()`, making it the preferred efficient iterator when available.","model_patch":"```lua\nfor entity in ents.Iterator() do\n    -- Use entity\nend\n```\nReason: `ents.Iterator()` visits every entity without allocating the intermediate table returned by `ents.GetAll()`, making it the preferred efficient iterator when available."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":13552,"startedAt":"2026-07-11T07:31:07.738Z","completedAt":"2026-07-11T07:31:21.292Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17847,"completionTokens":72,"totalTokens":17919,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal nearbyEntities = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for a simple radius around the player and avoids the broader semantics of `FindInPVS`.","model_patch":"```lua\nlocal nearbyEntities = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for a simple radius around the player and avoids the broader semantics of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12488,"startedAt":"2026-07-11T07:31:08.240Z","completedAt":"2026-07-11T07:31:20.736Z","answerBytes":504,"answerChars":504,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":235,"totalTokens":18076,"reasoningTokens":88,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(position) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating the small player list directly avoids scanning every entity in the sphere, and squared distance avoids a square root per player.","model_patch":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(position) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating the small player list directly avoids scanning every entity in the sphere, and squared distance avoids a square root per player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12528,"startedAt":"2026-07-11T07:31:08.671Z","completedAt":"2026-07-11T07:31:21.273Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":75,"totalTokens":17909,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a simple `while` loop is generally faster than a numeric `for` loop for tight counting.","model_patch":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a simple `while` loop is generally faster than a numeric `for` loop for tight counting."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13199,"startedAt":"2026-07-11T07:31:08.970Z","completedAt":"2026-07-11T07:31:22.302Z","answerBytes":252,"answerChars":252,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":73,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomLogicTick\", player.GetAll())\nend)\n```\nReason: Calling hook.Run once per tick avoids repeated hook dispatch overhead; listeners can loop through the supplied players themselves.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomLogicTick\", player.GetAll())\nend)\n```\nReason: Calling hook.Run once per tick avoids repeated hook dispatch overhead; listeners can loop through the supplied players themselves."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9802,"startedAt":"2026-07-11T07:31:09.083Z","completedAt":"2026-07-11T07:31:19.301Z","answerBytes":341,"answerChars":341,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":115,"totalTokens":17954,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant player lookup and method calls.","model_patch":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\ndraw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\n```\nReason: Cache the health value once per HUDPaint call to avoid two redundant player lookup and method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13434,"startedAt":"2026-07-11T07:31:10.678Z","completedAt":"2026-07-11T07:31:24.114Z","answerBytes":225,"answerChars":225,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":76,"totalTokens":17901,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    drawSomething(items[i], WHITE)\nend\n```\nReason: Create the Color once outside the hot loop to avoid allocating and initializing the same value every iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    drawSomething(items[i], WHITE)\nend\n```\nReason: Create the Color once outside the hot loop to avoid allocating and initializing the same value every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13184,"startedAt":"2026-07-11T07:31:11.047Z","completedAt":"2026-07-11T07:31:24.233Z","answerBytes":176,"answerChars":176,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":84,"totalTokens":17909,"reasoningTokens":14,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching math.sin in a local avoids repeated global table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14803,"startedAt":"2026-07-11T07:31:12.626Z","completedAt":"2026-07-11T07:31:27.472Z","answerBytes":414,"answerChars":414,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":201,"totalTokens":18033,"reasoningTokens":84,"cachedTokens":0},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"Example\", function()\n    if IsValid(localPlayer) then\n        local position = localPlayer:GetPos()\n    end\nend)\n```\nReason: Cache the player entity once after initialization so hot paths reuse a local variable instead of repeatedly calling the global LocalPlayer() lookup.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"Example\", function()\n    if IsValid(localPlayer) then\n        local position = localPlayer:GetPos()\n    end\nend)\n```\nReason: Cache the player entity once after initialization so hot paths reuse a local variable instead of repeatedly calling the global LocalPlayer() lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14826,"startedAt":"2026-07-11T07:31:12.793Z","completedAt":"2026-07-11T07:31:27.620Z","answerBytes":458,"answerChars":458,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":200,"totalTokens":18046,"reasoningTokens":61,"cachedTokens":17152},"finalResponse":"```lua\nlocal facingDot = 0.8 -- Higher means stricter; 0.8 is roughly within 37 degrees.\n\nlocal function AreLookingAtEachOther(a, b)\n    local direction = (b:EyePos() - a:EyePos()):GetNormalized()\n\n    return a:GetAimVector():Dot(direction) >= facingDot\n       and b:GetAimVector():Dot(-direction) >= facingDot\nend\n```\nReason: Dot products compare aim alignment directly against a precomputed threshold, avoiding the cost of math.acos and angle construction.","model_patch":"```lua\nlocal facingDot = 0.8 -- Higher means stricter; 0.8 is roughly within 37 degrees.\n\nlocal function AreLookingAtEachOther(a, b)\n    local direction = (b:EyePos() - a:EyePos()):GetNormalized()\n\n    return a:GetAimVector():Dot(direction) >= facingDot\n       and b:GetAimVector():Dot(-direction) >= facingDot\nend\n```\nReason: Dot products compare aim alignment directly against a precomputed threshold, avoiding the cost of math.acos and angle construction."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13312,"startedAt":"2026-07-11T07:31:13.159Z","completedAt":"2026-07-11T07:31:26.473Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":61,"totalTokens":17897,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A direct function call generally avoids the metatable method lookup performed by `ply:SomeHelper()`; the implicit `self` argument itself has no meaningful extra cost.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A direct function call generally avoids the metatable method lookup performed by `ply:SomeHelper()`; the implicit `self` argument itself has no meaningful extra cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14481,"startedAt":"2026-07-11T07:31:13.853Z","completedAt":"2026-07-11T07:31:28.348Z","answerBytes":124,"answerChars":124,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":104,"totalTokens":17935,"reasoningTokens":55,"cachedTokens":0},"finalResponse":"```lua\nMsg(\"Debug line\\n\")\n```\nReason: Msg avoids print's extra argument formatting and is faster for a preformatted string.","model_patch":"```lua\nMsg(\"Debug line\\n\")\n```\nReason: Msg avoids print's extra argument formatting and is faster for a preformatted string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6195,"startedAt":"2026-07-11T07:31:13.972Z","completedAt":"2026-07-11T07:31:20.246Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":72,"totalTokens":17911,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric for loop typically has the least iterator overhead for a large dense sequential table, making it faster than ipairs and pairs.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric for loop typically has the least iterator overhead for a large dense sequential table, making it faster than ipairs and pairs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13957,"startedAt":"2026-07-11T07:31:15.024Z","completedAt":"2026-07-11T07:31:28.985Z","answerBytes":343,"answerChars":343,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":161,"totalTokens":18010,"reasoningTokens":55,"cachedTokens":0},"finalResponse":"```lua\nlocal results = {}\nlocal count = 0\n\nfor i = 1, #jobs do\n    local job = jobs[i]\n    if job.salary >= minimumSalary then\n        count = count + 1\n        results[count] = string.lower(job.name)\n    end\nend\n```\nReason: One fused numeric loop avoids fn callback overhead and the intermediate table normally created between filter and map.","model_patch":"```lua\nlocal results = {}\nlocal count = 0\n\nfor i = 1, #jobs do\n    local job = jobs[i]\n    if job.salary >= minimumSalary then\n        count = count + 1\n        results[count] = string.lower(job.name)\n    end\nend\n```\nReason: One fused numeric loop avoids fn callback overhead and the intermediate table normally created between filter and map."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19260,"startedAt":"2026-07-11T07:31:16.142Z","completedAt":"2026-07-11T07:31:35.442Z","answerBytes":1088,"answerChars":1088,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":441,"totalTokens":18287,"reasoningTokens":126,"cachedTokens":17152},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\nlocal playerIndex = {}\n\nfor i, ply in ipairs(cachedPlayers) do\n    playerIndex[ply] = i\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache.Add\", function(ply)\n    if playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache.Remove\", function(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if index ~= lastIndex then\n        playerIndex[lastPlayer] = index\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: This removes the per-tick `player.GetAll()` allocation and uses O(1) join, lookup, and swap-removal while keeping the cached table dense for fast numeric iteration.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\nlocal playerIndex = {}\n\nfor i, ply in ipairs(cachedPlayers) do\n    playerIndex[ply] = i\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache.Add\", function(ply)\n    if playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache.Remove\", function(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if index ~= lastIndex then\n        playerIndex[lastPlayer] = index\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: This removes the per-tick `player.GetAll()` allocation and uses O(1) join, lookup, and swap-removal while keeping the cached table dense for fast numeric iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16769,"startedAt":"2026-07-11T07:31:16.148Z","completedAt":"2026-07-11T07:31:33.022Z","answerBytes":398,"answerChars":398,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":186,"totalTokens":18021,"reasoningTokens":67,"cachedTokens":17152},"finalResponse":"```lua\nlocal temporaryData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTemporaryData(ply, value)\n    temporaryData[ply] = value\nend\n\nlocal function GetTemporaryData(ply)\n    return temporaryData[ply]\nend\n```\nReason: A local Lua table lookup avoids the Player userdata metatable (`__index`) path used by `ply.someField`, and weak keys prevent stale player references from being retained.","model_patch":"```lua\nlocal temporaryData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTemporaryData(ply, value)\n    temporaryData[ply] = value\nend\n\nlocal function GetTemporaryData(ply)\n    return temporaryData[ply]\nend\n```\nReason: A local Lua table lookup avoids the Player userdata metatable (`__index`) path used by `ply.someField`, and weak keys prevent stale player references from being retained."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13566,"startedAt":"2026-07-11T07:31:16.462Z","completedAt":"2026-07-11T07:31:30.077Z","answerBytes":293,"answerChars":291,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":90,"totalTokens":17922,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor index = 1, #values do\n    local value = values[index]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use Lua’s optimized array storage and a numeric loop avoids the hashing and iterator overhead of string-keyed maps.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor index = 1, #values do\n    local value = values[index]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use Lua’s optimized array storage and a numeric loop avoids the hashing and iterator overhead of string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15139,"startedAt":"2026-07-11T07:31:17.128Z","completedAt":"2026-07-11T07:31:32.329Z","answerBytes":158,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":110,"totalTokens":17949,"reasoningTokens":51,"cachedTokens":17152},"finalResponse":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing numeric channels directly avoids creating or unpacking a Color object in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing numeric channels directly avoids creating or unpacking a Color object in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13169,"startedAt":"2026-07-11T07:31:17.631Z","completedAt":"2026-07-11T07:31:30.815Z","answerBytes":246,"answerChars":246,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17855,"completionTokens":77,"totalTokens":17932,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n```\nReason: Local SQLite typically has lower read/write latency because it avoids network round trips to a remote MySQL server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n```\nReason: Local SQLite typically has lower read/write latency because it avoids network round trips to a remote MySQL server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12203,"startedAt":"2026-07-11T07:31:17.812Z","completedAt":"2026-07-11T07:31:30.019Z","answerBytes":363,"answerChars":363,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":211,"totalTokens":18039,"reasoningTokens":94,"cachedTokens":17152},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: Weak player keys avoid repeated engine calls without retaining disconnected player entities.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: Weak player keys avoid repeated engine calls without retaining disconnected player entities."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12513,"startedAt":"2026-07-11T07:31:18.319Z","completedAt":"2026-07-11T07:31:30.844Z","answerBytes":259,"answerChars":259,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":82,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = \"piece \" .. i\nend\n\nlocal result = table.concat(pieces)\n```\nReason: Collecting pieces and joining once with table.concat avoids repeatedly allocating and copying an ever-growing intermediate string.","model_patch":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = \"piece \" .. i\nend\n\nlocal result = table.concat(pieces)\n```\nReason: Collecting pieces and joining once with table.concat avoids repeatedly allocating and copying an ever-growing intermediate string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13214,"startedAt":"2026-07-11T07:31:18.421Z","completedAt":"2026-07-11T07:31:31.638Z","answerBytes":195,"answerChars":195,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":65,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` directly draws a non-rounded rectangle and avoids the extra `draw.RoundedBox` wrapper work.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` directly draws a non-rounded rectangle and avoids the extra `draw.RoundedBox` wrapper work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15146,"startedAt":"2026-07-11T07:31:18.633Z","completedAt":"2026-07-11T07:31:33.783Z","answerBytes":281,"answerChars":281,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":172,"totalTokens":18006,"reasoningTokens":73,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(text)\n```\nReason: Direct `surface.*` calls avoid the extra alignment, multiline, and outline work performed by `draw.DrawText` and `draw.SimpleTextOutlined`.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(text)\n```\nReason: Direct `surface.*` calls avoid the extra alignment, multiline, and outline work performed by `draw.DrawText` and `draw.SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12095,"startedAt":"2026-07-11T07:31:18.828Z","completedAt":"2026-07-11T07:31:30.925Z","answerBytes":148,"answerChars":148,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":51,"totalTokens":17877,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal length = #items\n```\nReason: The `#` length operator is the native and preferred way to get the length of a sequential array-like table.","model_patch":"```lua\nlocal length = #items\n```\nReason: The `#` length operator is the native and preferred way to get the length of a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12261,"startedAt":"2026-07-11T07:31:19.211Z","completedAt":"2026-07-11T07:31:31.486Z","answerBytes":147,"answerChars":147,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":51,"totalTokens":17882,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding creates a fresh empty table in constant time, while table.Empty(t) must remove the existing entries one by one.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding creates a fresh empty table in constant time, while table.Empty(t) must remove the existing entries one by one."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13769,"startedAt":"2026-07-11T07:31:19.303Z","completedAt":"2026-07-11T07:31:33.073Z","answerBytes":436,"answerChars":436,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":138,"totalTokens":17971,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Slower: linear scan through a list\nlocal allowed = { \"admin\", \"moderator\", \"developer\" }\nlocal isAllowed = table.HasValue(allowed, userGroup)\n\n-- Faster: direct lookup in a set\nlocal allowedSet = {\n    admin = true,\n    moderator = true,\n    developer = true,\n}\nlocal isAllowedFast = allowedSet[userGroup] == true\n```\nReason: A set-style table uses an average O(1) key lookup, while table.HasValue scans the list in O(n) time.","model_patch":"```lua\n-- Slower: linear scan through a list\nlocal allowed = { \"admin\", \"moderator\", \"developer\" }\nlocal isAllowed = table.HasValue(allowed, userGroup)\n\n-- Faster: direct lookup in a set\nlocal allowedSet = {\n    admin = true,\n    moderator = true,\n    developer = true,\n}\nlocal isAllowedFast = allowedSet[userGroup] == true\n```\nReason: A set-style table uses an average O(1) key lookup, while table.HasValue scans the list in O(n) time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12062,"startedAt":"2026-07-11T07:31:19.942Z","completedAt":"2026-07-11T07:31:32.024Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":68,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal data = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor initializes known fields directly and avoids separate assignment operations after creating an empty table.","model_patch":"```lua\nlocal data = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor initializes known fields directly and avoids separate assignment operations after creating an empty table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12103,"startedAt":"2026-07-11T07:31:20.116Z","completedAt":"2026-07-11T07:31:32.329Z","answerBytes":181,"answerChars":181,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":54,"totalTokens":17882,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key traversal and temporary key collection.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key traversal and temporary key collection."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12413,"startedAt":"2026-07-11T07:31:20.248Z","completedAt":"2026-07-11T07:31:32.664Z","answerBytes":119,"answerChars":119,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":79,"totalTokens":17904,"reasoningTokens":33,"cachedTokens":0},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the preferred fast form for squaring in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the preferred fast form for squaring in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-sol@high","model_name_or_path":"gpt-5.6-sol@high","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":16212,"startedAt":"2026-07-11T07:31:20.318Z","completedAt":"2026-07-11T07:31:36.533Z","answerBytes":203,"answerChars":203,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":173,"totalTokens":18012,"reasoningTokens":111,"cachedTokens":17152},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: player.Iterator() traverses the currently connected players directly without creating the table returned by player.GetAll().","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: player.Iterator() traverses the currently connected players directly without creating the table returned by player.GetAll()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9551,"startedAt":"2026-07-11T07:31:20.575Z","completedAt":"2026-07-11T07:31:30.279Z","answerBytes":263,"answerChars":263,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":135,"totalTokens":17967,"reasoningTokens":49,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Visit ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly, avoiding the table allocation performed by `ents.GetAll()` or `ents.FindByClass()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Visit ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses entities directly, avoiding the table allocation performed by `ents.GetAll()` or `ents.FindByClass()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":13317,"startedAt":"2026-07-11T07:31:20.737Z","completedAt":"2026-07-11T07:31:34.056Z","answerBytes":153,"answerChars":153,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":55,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that Garry's Mod runs on every Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that Garry's Mod runs on every Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":14141,"startedAt":"2026-07-11T07:31:21.056Z","completedAt":"2026-07-11T07:31:35.229Z","answerBytes":176,"answerChars":176,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":62,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid` checks that the reference exists and, for entities, has not been removed before you call its methods.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid` checks that the reference exists and, for entities, has not been removed before you call its methods."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13278,"startedAt":"2026-07-11T07:31:21.334Z","completedAt":"2026-07-11T07:31:34.716Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":65,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback that runs when `MyAddon.Sync` arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback that runs when `MyAddon.Sync` arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":23798,"startedAt":"2026-07-11T07:31:21.376Z","completedAt":"2026-07-11T07:31:45.316Z","answerBytes":147,"answerChars":147,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":277,"totalTokens":18109,"reasoningTokens":223,"cachedTokens":0},"finalResponse":"```lua\nlocal zero = angle_zero -- Reuse; do not mutate.\n```\nReason: `angle_zero` avoids the allocation and constructor call performed by `Angle()`.","model_patch":"```lua\nlocal zero = angle_zero -- Reuse; do not mutate.\n```\nReason: `angle_zero` avoids the allocation and constructor call performed by `Angle()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13080,"startedAt":"2026-07-11T07:31:21.491Z","completedAt":"2026-07-11T07:31:34.997Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":109,"totalTokens":17946,"reasoningTokens":43,"cachedTokens":0},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable avoids global lookup and nested table indexing, so it is fastest for a frequently read setting.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable avoids global lookup and nested table indexing, so it is fastest for a frequently read setting."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13344,"startedAt":"2026-07-11T07:31:22.378Z","completedAt":"2026-07-11T07:31:35.819Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":73,"totalTokens":17908,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job value through its DarkRPVar API, so use `getDarkRPVar(\"job\")` instead of reading the underlying networked string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP owns and synchronizes the job value through its DarkRPVar API, so use `getDarkRPVar(\"job\")` instead of reading the underlying networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13139,"startedAt":"2026-07-11T07:31:23.384Z","completedAt":"2026-07-11T07:31:36.531Z","answerBytes":213,"answerChars":213,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":71,"totalTokens":17905,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root required for the actual distance, making threshold comparisons faster.","model_patch":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root required for the actual distance, making threshold comparisons faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9864,"startedAt":"2026-07-11T07:31:24.133Z","completedAt":"2026-07-11T07:31:34.056Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":123,"totalTokens":17949,"reasoningTokens":59,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent.\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator and avoids allocating the table returned by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent.\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator and avoids allocating the table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16185,"startedAt":"2026-07-11T07:31:24.291Z","completedAt":"2026-07-11T07:31:40.484Z","answerBytes":289,"answerChars":289,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":196,"totalTokens":18045,"reasoningTokens":111,"cachedTokens":0},"finalResponse":"```lua\nlocal position = player:GetPos()\nlocal radius = 512\nlocal nearbyEntities = ents.FindInSphere(position, radius)\n```\nReason: `ents.FindInSphere` uses Garry's Mod's built-in spatial partition and is typically much cheaper than scanning `ents.GetAll()` and calculating distances in Lua.","model_patch":"```lua\nlocal position = player:GetPos()\nlocal radius = 512\nlocal nearbyEntities = ents.FindInSphere(position, radius)\n```\nReason: `ents.FindInSphere` uses Garry's Mod's built-in spatial partition and is typically much cheaper than scanning `ents.GetAll()` and calculating distances in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18166,"startedAt":"2026-07-11T07:31:26.477Z","completedAt":"2026-07-11T07:31:44.645Z","answerBytes":509,"answerChars":509,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":271,"totalTokens":18112,"reasoningTokens":126,"cachedTokens":17152},"finalResponse":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSquared = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if position:DistToSqr(ply:GetPos()) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating the player list avoids scanning nearby non-player entities, and squared-distance checks avoid a square root for every player.","model_patch":"```lua\nlocal function FindPlayersNear(position, radius)\n    local nearby = {}\n    local radiusSquared = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if position:DistToSqr(ply:GetPos()) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating the player list avoids scanning nearby non-player entities, and squared-distance checks avoid a square root for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19241,"startedAt":"2026-07-11T07:31:26.895Z","completedAt":"2026-07-11T07:31:46.167Z","answerBytes":159,"answerChars":159,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":169,"totalTokens":18003,"reasoningTokens":109,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric for loop generally has less interpreter overhead than an equivalent while loop in Garry's Mod Lua.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric for loop generally has less interpreter overhead than an equivalent while loop in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22523,"startedAt":"2026-07-11T07:31:27.620Z","completedAt":"2026-07-11T07:31:50.248Z","answerBytes":591,"answerChars":591,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17844,"completionTokens":283,"totalTokens":18127,"reasoningTokens":109,"cachedTokens":0},"finalResponse":"```lua\n-- Faster: dispatch once per tick with the player list.\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply.\n    end\nend)\n\n-- Slower: dispatches the hook once for every player.\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"CustomPlayerTick\", ply)\n-- end\n```\nReason: One hook.Run call avoids repeating hook lookup and callback dispatch overhead for every player.","model_patch":"```lua\n-- Faster: dispatch once per tick with the player list.\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply.\n    end\nend)\n\n-- Slower: dispatches the hook once for every player.\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"CustomPlayerTick\", ply)\n-- end\n```\nReason: One hook.Run call avoids repeating hook lookup and callback dispatch overhead for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15398,"startedAt":"2026-07-11T07:31:27.692Z","completedAt":"2026-07-11T07:31:43.128Z","answerBytes":419,"answerChars":419,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":192,"totalTokens":18031,"reasoningTokens":54,"cachedTokens":17152},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the health value once per HUDPaint call to avoid repeating the player lookup and method call three times.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the health value once per HUDPaint call to avoid repeating the player lookup and method call three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":53691,"startedAt":"2026-07-11T07:31:28.359Z","completedAt":"2026-07-11T07:32:22.137Z","answerBytes":264,"answerChars":264,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":138,"totalTokens":17967,"reasoningTokens":41,"cachedTokens":17152},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    draw.SimpleText(items[i].text, \"DermaDefault\", items[i].x, items[i].y, WHITE)\nend\n```\nReason: Create the color once outside the paint loop to avoid allocating a new color table on every iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    draw.SimpleText(items[i].text, \"DermaDefault\", items[i].x, items[i].y, WHITE)\nend\n```\nReason: Create the color once outside the paint loop to avoid allocating a new color table on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13645,"startedAt":"2026-07-11T07:31:29.021Z","completedAt":"2026-07-11T07:31:42.780Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":101,"totalTokens":17930,"reasoningTokens":28,"cachedTokens":17152},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global and table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global and table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19260,"startedAt":"2026-07-11T07:31:30.076Z","completedAt":"2026-07-11T07:31:49.525Z","answerBytes":480,"answerChars":480,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":250,"totalTokens":18084,"reasoningTokens":120,"cachedTokens":0},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if IsValid(localPlayer) then\n        local position = localPlayer:GetPos()\n        -- Use localPlayer here instead of calling LocalPlayer() again.\n    end\nend)\n```\nReason: A cached local reference avoids repeated global function lookup and LocalPlayer retrieval after the client entity is initialized.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if IsValid(localPlayer) then\n        local position = localPlayer:GetPos()\n        -- Use localPlayer here instead of calling LocalPlayer() again.\n    end\nend)\n```\nReason: A cached local reference avoids repeated global function lookup and LocalPlayer retrieval after the client entity is initialized."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16251,"startedAt":"2026-07-11T07:31:30.220Z","completedAt":"2026-07-11T07:31:46.641Z","answerBytes":355,"answerChars":355,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17850,"completionTokens":235,"totalTokens":18085,"reasoningTokens":128,"cachedTokens":0},"finalResponse":"```lua\nlocal FACE_TO_FACE_DOT = -0.8\n\nlocal function AreAimDirectionsFacingEachOther(playerA, playerB)\n    return playerA:GetAimVector():Dot(playerB:GetAimVector()) <= FACE_TO_FACE_DOT\nend\n```\nReason: The dot product compares the already-normalized aim vectors directly; values near -1 mean opposite, face-to-face directions without the cost of math.acos.","model_patch":"```lua\nlocal FACE_TO_FACE_DOT = -0.8\n\nlocal function AreAimDirectionsFacingEachOther(playerA, playerB)\n    return playerA:GetAimVector():Dot(playerB:GetAimVector()) <= FACE_TO_FACE_DOT\nend\n```\nReason: The dot product compares the already-normalized aim vectors directly; values near -1 mean opposite, face-to-face directions without the cost of math.acos."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5754,"startedAt":"2026-07-11T07:31:30.350Z","completedAt":"2026-07-11T07:31:36.340Z","answerBytes":212,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":61,"totalTokens":17903,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: It is generally slightly faster because it avoids the implicit `self` method-call lookup and dispatch; use `:` only when method semantics or metatable-based organization matter.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: It is generally slightly faster because it avoids the implicit `self` method-call lookup and dispatch; use `:` only when method semantics or metatable-based organization matter."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12882,"startedAt":"2026-07-11T07:31:30.908Z","completedAt":"2026-07-11T07:31:43.953Z","answerBytes":120,"answerChars":120,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":101,"totalTokens":17932,"reasoningTokens":50,"cachedTokens":17152},"finalResponse":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes directly to the console without `print`'s extra formatting overhead.","model_patch":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes directly to the console without `print`'s extra formatting overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12180,"startedAt":"2026-07-11T07:31:30.924Z","completedAt":"2026-07-11T07:31:43.241Z","answerBytes":243,"answerChars":243,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":143,"totalTokens":17984,"reasoningTokens":63,"cachedTokens":17152},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local number = numbers[i]\n    -- use number\nend\n```\nReason: A numeric `for` loop avoids the iterator and function-call overhead of `pairs` and `ipairs`, making it typically fastest for large sequential arrays.","model_patch":"```lua\nfor i = 1, #numbers do\n    local number = numbers[i]\n    -- use number\nend\n```\nReason: A numeric `for` loop avoids the iterator and function-call overhead of `pairs` and `ipairs`, making it typically fastest for large sequential arrays."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16373,"startedAt":"2026-07-11T07:31:31.020Z","completedAt":"2026-07-11T07:31:47.459Z","answerBytes":339,"answerChars":339,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":177,"totalTokens":18026,"reasoningTokens":64,"cachedTokens":17152},"finalResponse":"```lua\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() then\n        count = count + 1\n        names[count] = ply:Nick()\n    end\nend\n```\nReason: A fused numeric loop avoids fn combinator callbacks and intermediate tables while performing the same filter-then-map work.","model_patch":"```lua\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() then\n        count = count + 1\n        names[count] = ply:Nick()\n    end\nend\n```\nReason: A fused numeric loop avoids fn combinator callbacks and intermediate tables while performing the same filter-then-map work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20902,"startedAt":"2026-07-11T07:31:31.637Z","completedAt":"2026-07-11T07:31:52.660Z","answerBytes":1067,"answerChars":1067,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17848,"completionTokens":429,"totalTokens":18277,"reasoningTokens":118,"cachedTokens":17152},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\nlocal playerIndex = {}\n\nfor i = 1, #cachedPlayers do\n    playerIndex[cachedPlayers[i]] = i\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", function(ply)\n    if playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if index ~= lastIndex then\n        playerIndex[lastPlayer] = index\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: This removes the per-tick player.GetAll allocation and uses O(1) join, removal, and indexed iteration over the cached array.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\nlocal playerIndex = {}\n\nfor i = 1, #cachedPlayers do\n    playerIndex[cachedPlayers[i]] = i\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", function(ply)\n    if playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", function(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if index ~= lastIndex then\n        playerIndex[lastPlayer] = index\n    end\nend)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: This removes the per-tick player.GetAll allocation and uses O(1) join, removal, and indexed iteration over the cached array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21326,"startedAt":"2026-07-11T07:31:31.708Z","completedAt":"2026-07-11T07:31:53.223Z","answerBytes":431,"answerChars":431,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":282,"totalTokens":18121,"reasoningTokens":151,"cachedTokens":0},"finalResponse":"```lua\nlocal playerData = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"InitFastPlayerData\", function(ply)\n    playerData[ply] = 0\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanupFastPlayerData\", function(ply)\n    playerData[ply] = nil\nend)\n\n-- Hot read path:\nlocal value = playerData[ply]\n```\nReason: A direct Lua table lookup avoids the slower Player userdata/metatable field lookup, while disconnect cleanup prevents stale player references.","model_patch":"```lua\nlocal playerData = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"InitFastPlayerData\", function(ply)\n    playerData[ply] = 0\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanupFastPlayerData\", function(ply)\n    playerData[ply] = nil\nend)\n\n-- Hot read path:\nlocal value = playerData[ply]\n```\nReason: A direct Lua table lookup avoids the slower Player userdata/metatable field lookup, while disconnect cleanup prevents stale player references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13631,"startedAt":"2026-07-11T07:31:32.097Z","completedAt":"2026-07-11T07:31:45.952Z","answerBytes":268,"answerChars":268,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":86,"totalTokens":17922,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because indexed access avoids hash-key lookup overhead.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because indexed access avoids hash-key lookup overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18153,"startedAt":"2026-07-11T07:31:32.348Z","completedAt":"2026-07-11T07:31:50.544Z","answerBytes":166,"answerChars":166,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":86,"totalTokens":17925,"reasoningTokens":27,"cachedTokens":17152},"finalResponse":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate numeric channels avoids Color object creation and table-field access in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing separate numeric channels avoids Color object creation and table-field access in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12762,"startedAt":"2026-07-11T07:31:32.349Z","completedAt":"2026-07-11T07:31:45.113Z","answerBytes":279,"answerChars":279,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17859,"completionTokens":78,"totalTokens":17937,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips; use MySQL when shared multi-server access or external database tooling is required.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips; use MySQL when shared multi-server access or external database tooling is required."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20114,"startedAt":"2026-07-11T07:31:32.668Z","completedAt":"2026-07-11T07:31:52.784Z","answerBytes":436,"answerChars":436,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":418,"totalTokens":18248,"reasoningTokens":284,"cachedTokens":17152},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n```\nReason: Steam IDs are stable for a player's lifetime, so a weak-key cache replaces repeated engine calls with table lookups without retaining disconnected player entities.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n```\nReason: Steam IDs are stable for a player's lifetime, so a weak-key cache replaces repeated engine calls with table lookups without retaining disconnected player entities."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12874,"startedAt":"2026-07-11T07:31:33.040Z","completedAt":"2026-07-11T07:31:45.950Z","answerBytes":408,"answerChars":408,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":171,"totalTokens":18006,"reasoningTokens":35,"cachedTokens":0},"finalResponse":"```lua\n-- Slow: repeatedly reallocates and copies the growing string.\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. tostring(i) .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join them once.\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = tostring(i)\nend\nlocal result = table.concat(pieces, \"\\n\")\n```\nReason: table.concat avoids repeatedly allocating and copying the entire growing string.","model_patch":"```lua\n-- Slow: repeatedly reallocates and copies the growing string.\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. tostring(i) .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join them once.\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = tostring(i)\nend\nlocal result = table.concat(pieces, \"\\n\")\n```\nReason: table.concat avoids repeatedly allocating and copying the entire growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8453,"startedAt":"2026-07-11T07:31:33.202Z","completedAt":"2026-07-11T07:31:41.720Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":66,"totalTokens":17901,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box helper overhead when the corner radius is zero."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17206,"startedAt":"2026-07-11T07:31:33.798Z","completedAt":"2026-07-11T07:31:51.033Z","answerBytes":293,"answerChars":293,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":165,"totalTokens":18001,"reasoningTokens":68,"cachedTokens":17152},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Single-line text\")\n```\nReason: surface.DrawText avoids the extra alignment, newline handling, and outline passes performed by draw.DrawText and draw.SimpleTextOutlined.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(20, 20)\nsurface.DrawText(\"Single-line text\")\n```\nReason: surface.DrawText avoids the extra alignment, newline handling, and outline passes performed by draw.DrawText and draw.SimpleTextOutlined."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6999,"startedAt":"2026-07-11T07:31:34.062Z","completedAt":"2026-07-11T07:31:41.066Z","answerBytes":130,"answerChars":130,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":44,"totalTokens":17870,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nlocal length = #tbl\n```\nReason: The length operator is the idiomatic and efficient choice for sequential array-like tables.","model_patch":"```lua\nlocal length = #tbl\n```\nReason: The length operator is the idiomatic and efficient choice for sequential array-like tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12762,"startedAt":"2026-07-11T07:31:34.065Z","completedAt":"2026-07-11T07:31:46.836Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":70,"totalTokens":17905,"reasoningTokens":0,"cachedTokens":17152},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding is generally faster because it allocates a new empty table instead of iterating through and deleting every entry in the existing table; use table.Empty(t) only when other references must observe the same table being cleared.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding is generally faster because it allocates a new empty table instead of iterating through and deleting every entry in the existing table; use table.Empty(t) only when other references must observe the same table being cleared."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":15639,"startedAt":"2026-07-11T07:31:34.752Z","completedAt":"2026-07-11T07:31:50.436Z","answerBytes":451,"answerChars":451,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":146,"totalTokens":17979,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"admin\", \"moderator\", \"user\" }\n\n-- Slower: scans the whole list until it finds a match.\nlocal exists = table.HasValue(values, \"moderator\")\n\n-- Faster: store values as keys for direct lookup.\nlocal valueSet = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nexists = valueSet[\"moderator\"] == true\n```\nReason: A set-style key lookup is effectively O(1), while table.HasValue performs an O(n) linear scan of the list.","model_patch":"```lua\nlocal values = { \"admin\", \"moderator\", \"user\" }\n\n-- Slower: scans the whole list until it finds a match.\nlocal exists = table.HasValue(values, \"moderator\")\n\n-- Faster: store values as keys for direct lookup.\nlocal valueSet = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nexists = valueSet[\"moderator\"] == true\n```\nReason: A set-style key lookup is effectively O(1), while table.HasValue performs an O(n) linear scan of the list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14265,"startedAt":"2026-07-11T07:31:35.004Z","completedAt":"2026-07-11T07:31:49.307Z","answerBytes":262,"answerChars":262,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":76,"totalTokens":17908,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal playerData = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and initializes the table in one operation instead of performing separate field assignments.","model_patch":"```lua\nlocal playerData = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and initializes the table in one operation instead of performing separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5925,"startedAt":"2026-07-11T07:31:35.441Z","completedAt":"2026-07-11T07:31:41.939Z","answerBytes":154,"answerChars":154,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":50,"totalTokens":17880,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key iteration.","model_patch":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6807,"startedAt":"2026-07-11T07:31:35.818Z","completedAt":"2026-07-11T07:31:42.860Z","answerBytes":122,"answerChars":122,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":62,"totalTokens":17887,"reasoningTokens":16,"cachedTokens":0},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is faster than exponentiation for squaring in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is faster than exponentiation for squaring in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-sol@xhigh","model_name_or_path":"gpt-5.6-sol@xhigh","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":13700,"startedAt":"2026-07-11T07:31:35.903Z","completedAt":"2026-07-11T07:31:49.979Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":111,"totalTokens":17952,"reasoningTokens":48,"cachedTokens":0},"finalResponse":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each currently connected player directly without creating the table returned by `player.GetAll()`.","model_patch":"```lua\nfor ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: `player.Iterator()` visits each currently connected player directly without creating the table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23412,"startedAt":"2026-07-11T07:31:36.612Z","completedAt":"2026-07-11T07:32:00.220Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":507,"totalTokens":18339,"reasoningTokens":423,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses the engine's entity list directly instead of allocating the table returned by `ents.GetAll()`.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: `ents.Iterator()` traverses the engine's entity list directly instead of allocating the table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":13096,"startedAt":"2026-07-11T07:31:36.668Z","completedAt":"2026-07-11T07:31:49.871Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":52,"totalTokens":17888,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a uniquely identified callback that runs whenever the Think hook fires."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":15365,"startedAt":"2026-07-11T07:31:36.686Z","completedAt":"2026-07-11T07:31:52.179Z","answerBytes":149,"answerChars":149,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":106,"totalTokens":17937,"reasoningTokens":49,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid verifies that ent exists and has not been removed before a method is called.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid verifies that ent exists and has not been removed before a method is called."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14339,"startedAt":"2026-07-11T07:31:40.581Z","completedAt":"2026-07-11T07:31:54.999Z","answerBytes":176,"answerChars":176,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":122,"totalTokens":17946,"reasoningTokens":58,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback invoked when `MyAddon.Sync` arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the message here.\nend)\n```\nReason: `net.Receive` registers the callback invoked when `MyAddon.Sync` arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":31210,"startedAt":"2026-07-11T07:31:41.072Z","completedAt":"2026-07-11T07:32:12.287Z","answerBytes":193,"answerChars":193,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":752,"totalTokens":18584,"reasoningTokens":687,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = angle_zero\nlocal ang = ZERO_ANGLE -- treat as read-only\n```\nReason: Reusing Garry's Mod's cached zero Angle avoids the constructor call and allocation in the hot path.","model_patch":"```lua\nlocal ZERO_ANGLE = angle_zero\nlocal ang = ZERO_ANGLE -- treat as read-only\n```\nReason: Reusing Garry's Mod's cached zero Angle avoids the constructor call and allocation in the hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14870,"startedAt":"2026-07-11T07:31:41.746Z","completedAt":"2026-07-11T07:31:56.681Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":188,"totalTokens":18023,"reasoningTokens":119,"cachedTokens":17152},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable read avoids both global-table lookup and the two hash lookups required by `myaddon.config.color`.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local variable read avoids both global-table lookup and the two hash lookups required by `myaddon.config.color`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16689,"startedAt":"2026-07-11T07:31:41.947Z","completedAt":"2026-07-11T07:31:58.706Z","answerBytes":175,"answerChars":175,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":215,"totalTokens":18048,"reasoningTokens":147,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP networks `job` through its DarkRPVar API; `GetNWString(\"job\")` reads a separate engine networked-string slot.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP networks `job` through its DarkRPVar API; `GetNWString(\"job\")` reads a separate engine networked-string slot."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15314,"startedAt":"2026-07-11T07:31:42.828Z","completedAt":"2026-07-11T07:31:58.277Z","answerBytes":239,"answerChars":239,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":195,"totalTokens":18025,"reasoningTokens":116,"cachedTokens":0},"finalResponse":"```lua\nlocal maxDistance = 500\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range.\nend\n```\nReason: Vector:DistToSqr compares squared distances and avoids the square root required to calculate the actual distance.","model_patch":"```lua\nlocal maxDistance = 500\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- Within range.\nend\n```\nReason: Vector:DistToSqr compares squared distances and avoids the square root required to calculate the actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23680,"startedAt":"2026-07-11T07:31:42.962Z","completedAt":"2026-07-11T07:32:06.869Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":483,"totalTokens":18311,"reasoningTokens":422,"cachedTokens":17152},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here.\nend\n```\nReason: `ents.Iterator()` visits every entity without allocating the table copy created by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here.\nend\n```\nReason: `ents.Iterator()` visits every entity without allocating the table copy created by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16816,"startedAt":"2026-07-11T07:31:43.175Z","completedAt":"2026-07-11T07:32:00.064Z","answerBytes":206,"answerChars":206,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":214,"totalTokens":18063,"reasoningTokens":147,"cachedTokens":0},"finalResponse":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: `ents.FindInSphere` uses Garry's Mod's built-in spatial partition and is typically faster than scanning every entity in Lua.","model_patch":"```lua\nlocal nearbyEntities = ents.FindInSphere(player:GetPos(), 512)\n```\nReason: `ents.FindInSphere` uses Garry's Mod's built-in spatial partition and is typically faster than scanning every entity in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15422,"startedAt":"2026-07-11T07:31:43.246Z","completedAt":"2026-07-11T07:31:58.853Z","answerBytes":519,"answerChars":519,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":422,"totalTokens":18263,"reasoningTokens":281,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersInRadius(position, radius)\n    local radiusSquared = radius * radius\n    local nearby = {}\n    local count = 0\n\n    for _, ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(position) <= radiusSquared then\n            count = count + 1\n            nearby[count] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating only players avoids scanning unrelated entities, while DistToSqr avoids a square root and player.Iterator avoids creating a player-list table.","model_patch":"```lua\nlocal function FindPlayersInRadius(position, radius)\n    local radiusSquared = radius * radius\n    local nearby = {}\n    local count = 0\n\n    for _, ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(position) <= radiusSquared then\n            count = count + 1\n            nearby[count] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating only players avoids scanning unrelated entities, while DistToSqr avoids a square root and player.Iterator avoids creating a player-list table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17100,"startedAt":"2026-07-11T07:31:43.986Z","completedAt":"2026-07-11T07:32:01.159Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":225,"totalTokens":18057,"reasoningTokens":163,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops use specialized VM instructions and avoid the explicit increment required by while loops, so they are generally faster.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops use specialized VM instructions and avoid the explicit increment required by while loops, so they are generally faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":31291,"startedAt":"2026-07-11T07:31:44.747Z","completedAt":"2026-07-11T07:32:16.163Z","answerBytes":618,"answerChars":618,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":581,"totalTokens":18423,"reasoningTokens":398,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n\n    -- Faster: dispatch the hook once, then process every player.\n    hook.Run(\"CustomPlayerTick\", players)\n\n    -- Slower:\n    -- for i = 1, #players do\n    --     hook.Run(\"CustomPlayerTick\", players[i])\n    -- end\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom per-player logic here.\n    end\nend)\n```\nReason: One batched hook dispatch avoids repeating hook lookup and callback dispatch overhead for every player each tick.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n\n    -- Faster: dispatch the hook once, then process every player.\n    hook.Run(\"CustomPlayerTick\", players)\n\n    -- Slower:\n    -- for i = 1, #players do\n    --     hook.Run(\"CustomPlayerTick\", players[i])\n    -- end\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom per-player logic here.\n    end\nend)\n```\nReason: One batched hook dispatch avoids repeating hook lookup and callback dispatch overhead for every player each tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17242,"startedAt":"2026-07-11T07:31:45.242Z","completedAt":"2026-07-11T07:32:02.822Z","answerBytes":397,"answerChars":395,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":279,"totalTokens":18118,"reasoningTokens":145,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the frame’s health value once, avoiding two redundant Lua-to-engine method calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the frame’s health value once, avoiding two redundant Lua-to-engine method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17755,"startedAt":"2026-07-11T07:31:45.517Z","completedAt":"2026-07-11T07:32:03.539Z","answerBytes":234,"answerChars":234,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":309,"totalTokens":18134,"reasoningTokens":223,"cachedTokens":17152},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(white)\n    -- paint items[i]\nend\n```\nReason: Create the Color once outside the hot loop to avoid allocating a new color table on every iteration.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(white)\n    -- paint items[i]\nend\n```\nReason: Create the Color once outside the hot loop to avoid allocating a new color table on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15595,"startedAt":"2026-07-11T07:31:45.951Z","completedAt":"2026-07-11T07:32:01.587Z","answerBytes":158,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17827,"completionTokens":180,"totalTokens":18007,"reasoningTokens":114,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    values[i] = sin(i)\nend\n```\nReason: Localizing `math.sin` avoids a global-table lookup on every iteration.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    values[i] = sin(i)\nend\n```\nReason: Localizing `math.sin` avoids a global-table lookup on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":44226,"startedAt":"2026-07-11T07:31:45.953Z","completedAt":"2026-07-11T07:32:30.354Z","answerBytes":528,"answerChars":528,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":1125,"totalTokens":18959,"reasoningTokens":981,"cachedTokens":17152},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"FastLocalPlayerWork\", function()\n    if not IsValid(localPlayer) then return end\n\n    local position = localPlayer:GetPos()\n    local health = localPlayer:Health()\n    -- Reuse localPlayer throughout hot code paths.\nend)\n```\nReason: Cache the player entity once after client entities initialize, then reuse the local upvalue instead of repeatedly calling the global LocalPlayer function.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"FastLocalPlayerWork\", function()\n    if not IsValid(localPlayer) then return end\n\n    local position = localPlayer:GetPos()\n    local health = localPlayer:Health()\n    -- Reuse localPlayer throughout hot code paths.\nend)\n```\nReason: Cache the player entity once after client entities initialize, then reuse the local upvalue instead of repeatedly calling the global LocalPlayer function."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":25769,"startedAt":"2026-07-11T07:31:46.213Z","completedAt":"2026-07-11T07:32:12.057Z","answerBytes":353,"answerChars":353,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":624,"totalTokens":18470,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal FACING_DOT = -0.8 -- -1 = directly opposite\n\nlocal function AimDirectionsFaceEachOther(playerA, playerB)\n    return playerA:GetAimVector():Dot(playerB:GetAimVector()) <= FACING_DOT\nend\n```\nReason: Aim vectors are normalized, so their dot product is the cosine directly; values near -1 mean opposing directions without the cost of math.acos.","model_patch":"```lua\nlocal FACING_DOT = -0.8 -- -1 = directly opposite\n\nlocal function AimDirectionsFaceEachOther(playerA, playerB)\n    return playerA:GetAimVector():Dot(playerB:GetAimVector()) <= FACING_DOT\nend\n```\nReason: Aim vectors are normalized, so their dot product is the cosine directly; values near -1 mean opposing directions without the cost of math.acos."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19199,"startedAt":"2026-07-11T07:31:46.655Z","completedAt":"2026-07-11T07:32:05.889Z","answerBytes":178,"answerChars":178,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":207,"totalTokens":18043,"reasoningTokens":147,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A direct helper call generally avoids the entity method/metatable lookup required by `ply:SomeHelper()`, especially when `SomeHelper` is local.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A direct helper call generally avoids the entity method/metatable lookup required by `ply:SomeHelper()`, especially when `SomeHelper` is local."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16274,"startedAt":"2026-07-11T07:31:46.850Z","completedAt":"2026-07-11T07:32:03.250Z","answerBytes":149,"answerChars":149,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":187,"totalTokens":18018,"reasoningTokens":131,"cachedTokens":17152},"finalResponse":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes the string directly, avoiding `print`'s argument formatting overhead; add the newline explicitly.","model_patch":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes the string directly, avoiding `print`'s argument formatting overhead; add the newline explicitly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19428,"startedAt":"2026-07-11T07:31:47.461Z","completedAt":"2026-07-11T07:32:06.891Z","answerBytes":232,"answerChars":232,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":284,"totalTokens":18121,"reasoningTokens":206,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` with direct indexing typically beats `ipairs` and `pairs` by avoiding iterator overhead; it requires a dense sequential table.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` with direct indexing typically beats `ipairs` and `pairs` by avoiding iterator overhead; it requires a dense sequential table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17857,"startedAt":"2026-07-11T07:31:49.414Z","completedAt":"2026-07-11T07:32:07.421Z","answerBytes":437,"answerChars":437,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17847,"completionTokens":338,"totalTokens":18185,"reasoningTokens":208,"cachedTokens":17152},"finalResponse":"```lua\nlocal function eligibleJobNames(jobs, maxSalary)\n    local names = {}\n    local count = 0\n\n    for i = 1, #jobs do\n        local job = jobs[i]\n        if job.salary <= maxSalary and not job.admin then\n            count = count + 1\n            names[count] = job.name\n        end\n    end\n\n    return names\nend\n```\nReason: One numeric loop performs both filter and map without fn callback dispatch, closures, or intermediate tables.","model_patch":"```lua\nlocal function eligibleJobNames(jobs, maxSalary)\n    local names = {}\n    local count = 0\n\n    for i = 1, #jobs do\n        local job = jobs[i]\n        if job.salary <= maxSalary and not job.admin then\n            count = count + 1\n            names[count] = job.name\n        end\n    end\n\n    return names\nend\n```\nReason: One numeric loop performs both filter and map without fn callback dispatch, closures, or intermediate tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":49808,"startedAt":"2026-07-11T07:31:49.626Z","completedAt":"2026-07-11T07:32:39.585Z","answerBytes":1169,"answerChars":1169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":1362,"totalTokens":19208,"reasoningTokens":1034,"cachedTokens":17152},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal playerIndices = {}\n\nlocal function AddPlayer(ply)\n    if playerIndices[ply] then return end\n\n    local index = #cachedPlayers + 1\n    cachedPlayers[index] = ply\n    playerIndices[ply] = index\nend\n\nlocal function RemovePlayer(ply)\n    local index = playerIndices[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndices[ply] = nil\n\n    if lastPlayer ~= ply then\n        playerIndices[lastPlayer] = index\n    end\nend\n\nfor _, ply in ipairs(player.GetAll()) do\n    AddPlayer(ply)\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", AddPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", RemovePlayer)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: Join/leave hooks maintain the array, so Tick avoids player.GetAll(), ipairs(), and a fresh full-player traversal source every frame.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal playerIndices = {}\n\nlocal function AddPlayer(ply)\n    if playerIndices[ply] then return end\n\n    local index = #cachedPlayers + 1\n    cachedPlayers[index] = ply\n    playerIndices[ply] = index\nend\n\nlocal function RemovePlayer(ply)\n    local index = playerIndices[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndices[ply] = nil\n\n    if lastPlayer ~= ply then\n        playerIndices[lastPlayer] = index\n    end\nend\n\nfor _, ply in ipairs(player.GetAll()) do\n    AddPlayer(ply)\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", AddPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", RemovePlayer)\n\nhook.Add(\"Tick\", \"ProcessCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: Join/leave hooks maintain the array, so Tick avoids player.GetAll(), ipairs(), and a fresh full-player traversal source every frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21328,"startedAt":"2026-07-11T07:31:49.978Z","completedAt":"2026-07-11T07:32:11.362Z","answerBytes":297,"answerChars":297,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":610,"totalTokens":18441,"reasoningTokens":516,"cachedTokens":17152},"finalResponse":"```lua\nlocal someFieldByPlayer = setmetatable({}, { __mode = \"k\" })\n\nsomeFieldByPlayer[ply] = value\nlocal value = someFieldByPlayer[ply]\n```\nReason: A local table lookup avoids the Entity userdata/metatable lookup used by `ply.someField`, while weak keys prevent stale players from being retained.","model_patch":"```lua\nlocal someFieldByPlayer = setmetatable({}, { __mode = \"k\" })\n\nsomeFieldByPlayer[ply] = value\nlocal value = someFieldByPlayer[ply]\n```\nReason: A local table lookup avoids the Entity userdata/metatable lookup used by `ply.someField`, while weak keys prevent stale players from being retained."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14993,"startedAt":"2026-07-11T07:31:50.025Z","completedAt":"2026-07-11T07:32:05.051Z","answerBytes":281,"answerChars":279,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":377,"totalTokens":18211,"reasoningTokens":285,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- Use value.\nend\n```\nReason: Sequential number-indexed arrays use the table’s array part and support fast numeric iteration, while string-keyed maps require hash traversal.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- Use value.\nend\n```\nReason: Sequential number-indexed arrays use the table’s array part and support fast numeric iteration, while string-keyed maps require hash traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7930,"startedAt":"2026-07-11T07:31:50.348Z","completedAt":"2026-07-11T07:31:58.425Z","answerBytes":161,"answerChars":161,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":122,"totalTokens":17959,"reasoningTokens":64,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing numeric channels directly avoids Color table creation and lookup overhead in a hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing numeric channels directly avoids Color table creation and lookup overhead in a hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11904,"startedAt":"2026-07-11T07:31:50.542Z","completedAt":"2026-07-11T07:32:02.540Z","answerBytes":213,"answerChars":213,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17857,"completionTokens":264,"totalTokens":18121,"reasoningTokens":195,"cachedTokens":0},"finalResponse":"```lua\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite typically has lower latency because it avoids remote MySQL network round trips.","model_patch":"```lua\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64))\n```\nReason: Local SQLite typically has lower latency because it avoids remote MySQL network round trips."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":37593,"startedAt":"2026-07-11T07:31:50.750Z","completedAt":"2026-07-11T07:32:28.353Z","answerBytes":673,"answerChars":673,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":943,"totalTokens":18773,"reasoningTokens":735,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIDCache = {}\n\nhook.Add(\"PlayerAuthed\", \"CachePlayerSteamID\", function(ply, steamID)\n    steamIDCache[ply] = steamID\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedPlayerSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID ~= nil then\n        return steamID\n    end\n\n    steamID = ply:SteamID()\n    if steamID ~= \"STEAM_ID_PENDING\" then\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: A local table lookup avoids repeated engine-boundary calls and string work, while auth-time population and disconnect cleanup keep the cache correct.","model_patch":"```lua\nlocal steamIDCache = {}\n\nhook.Add(\"PlayerAuthed\", \"CachePlayerSteamID\", function(ply, steamID)\n    steamIDCache[ply] = steamID\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedPlayerSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\nlocal function getSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID ~= nil then\n        return steamID\n    end\n\n    steamID = ply:SteamID()\n    if steamID ~= \"STEAM_ID_PENDING\" then\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n```\nReason: A local table lookup avoids repeated engine-boundary calls and string work, while auth-time population and disconnect cleanup keep the cache correct."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":37751,"startedAt":"2026-07-11T07:31:51.057Z","completedAt":"2026-07-11T07:32:28.895Z","answerBytes":424,"answerChars":424,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":306,"totalTokens":18139,"reasoningTokens":175,"cachedTokens":17152},"finalResponse":"```lua\n-- Slow: allocates a new growing string on every iteration.\nlocal result = \"\"\nfor i = 1, #pieces do\n    result = result .. pieces[i]\nend\n\n-- Faster: collect pieces, then join once.\nlocal buffer = {}\nfor i = 1, #pieces do\n    buffer[i] = pieces[i]\nend\nlocal fastResult = table.concat(buffer)\n```\nReason: table.concat avoids repeatedly copying the entire growing string, reducing allocations and near-quadratic copying.","model_patch":"```lua\n-- Slow: allocates a new growing string on every iteration.\nlocal result = \"\"\nfor i = 1, #pieces do\n    result = result .. pieces[i]\nend\n\n-- Faster: collect pieces, then join once.\nlocal buffer = {}\nfor i = 1, #pieces do\n    buffer[i] = pieces[i]\nend\nlocal fastResult = table.concat(buffer)\n```\nReason: table.concat avoids repeatedly copying the entire growing string, reducing allocations and near-quadratic copying."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8957,"startedAt":"2026-07-11T07:31:52.246Z","completedAt":"2026-07-11T07:32:01.301Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":241,"totalTokens":18076,"reasoningTokens":176,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: surface.DrawRect draws a plain rectangle directly and avoids draw.RoundedBox's rounded-box setup and Lua overhead.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, width, height)\n```\nReason: surface.DrawRect draws a plain rectangle directly and avoids draw.RoundedBox's rounded-box setup and Lua overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13026,"startedAt":"2026-07-11T07:31:52.662Z","completedAt":"2026-07-11T07:32:05.698Z","answerBytes":384,"answerChars":382,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":354,"totalTokens":18190,"reasoningTokens":229,"cachedTokens":0},"finalResponse":"```lua\nlocal label = \"Fast HUD text\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(24, 24)\n    surface.DrawText(label)\nend)\n```\nReason: Direct surface calls avoid draw.DrawText’s layout work, while SimpleTextOutlined draws the text multiple times to create its outline.","model_patch":"```lua\nlocal label = \"Fast HUD text\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(24, 24)\n    surface.DrawText(label)\nend)\n```\nReason: Direct surface calls avoid draw.DrawText’s layout work, while SimpleTextOutlined draws the text multiple times to create its outline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5424,"startedAt":"2026-07-11T07:31:52.785Z","completedAt":"2026-07-11T07:31:58.212Z","answerBytes":133,"answerChars":133,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":88,"totalTokens":17912,"reasoningTokens":41,"cachedTokens":0},"finalResponse":"```lua\nlocal length = #items\n```\nReason: The length operator is the idiomatic and efficient choice for a sequential array-like table.","model_patch":"```lua\nlocal length = #items\n```\nReason: The length operator is the idiomatic and efficient choice for a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8473,"startedAt":"2026-07-11T07:31:53.252Z","completedAt":"2026-07-11T07:32:01.780Z","answerBytes":197,"answerChars":197,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":201,"totalTokens":18032,"reasoningTokens":141,"cachedTokens":17152},"finalResponse":"```lua\nt = {}\n```\nReason: Replacing the reference is generally faster than visiting and removing every entry with `table.Empty(t)`, provided no other code needs the original table cleared in place.","model_patch":"```lua\nt = {}\n```\nReason: Replacing the reference is generally faster than visiting and removing every entry with `table.Empty(t)`, provided no other code needs the original table cleared in place."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8845,"startedAt":"2026-07-11T07:31:55.000Z","completedAt":"2026-07-11T07:32:03.847Z","answerBytes":440,"answerChars":440,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":282,"totalTokens":18117,"reasoningTokens":135,"cachedTokens":17152},"finalResponse":"```lua\n-- Slower: O(n) linear scan\nlocal allowedList = { \"prop_physics\", \"prop_dynamic\", \"prop_ragdoll\" }\nlocal existsSlow = table.HasValue(allowedList, className)\n\n-- Faster: O(1) average lookup\nlocal allowedSet = {\n    prop_physics = true,\n    prop_dynamic = true,\n    prop_ragdoll = true,\n}\nlocal existsFast = allowedSet[className] == true\n```\nReason: A keyed set avoids table.HasValue's linear scan by using an average O(1) hash lookup.","model_patch":"```lua\n-- Slower: O(n) linear scan\nlocal allowedList = { \"prop_physics\", \"prop_dynamic\", \"prop_ragdoll\" }\nlocal existsSlow = table.HasValue(allowedList, className)\n\n-- Faster: O(1) average lookup\nlocal allowedSet = {\n    prop_physics = true,\n    prop_dynamic = true,\n    prop_ragdoll = true,\n}\nlocal existsFast = allowedSet[className] == true\n```\nReason: A keyed set avoids table.HasValue's linear scan by using an average O(1) hash lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7280,"startedAt":"2026-07-11T07:31:56.684Z","completedAt":"2026-07-11T07:32:03.978Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":205,"totalTokens":18037,"reasoningTokens":134,"cachedTokens":17152},"finalResponse":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    enabled = true,\n}\n```\nReason: Putting known fields in the constructor lets Lua create and populate the table directly, avoiding separate assignment operations.","model_patch":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    enabled = true,\n}\n```\nReason: Putting known fields in the constructor lets Lua create and populate the table directly, avoiding separate assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10238,"startedAt":"2026-07-11T07:31:58.219Z","completedAt":"2026-07-11T07:32:08.489Z","answerBytes":154,"answerChars":154,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":174,"totalTokens":18006,"reasoningTokens":123,"cachedTokens":17152},"finalResponse":"```lua\nlocal value = tbl[math.random(#tbl)]\n```\nReason: Sequential tables support direct numeric indexing, avoiding table.Random's key traversal overhead.","model_patch":"```lua\nlocal value = tbl[math.random(#tbl)]\n```\nReason: Sequential tables support direct numeric indexing, avoiding table.Random's key traversal overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5351,"startedAt":"2026-07-11T07:31:58.289Z","completedAt":"2026-07-11T07:32:03.660Z","answerBytes":121,"answerChars":121,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":107,"totalTokens":17932,"reasoningTokens":63,"cachedTokens":0},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids the slower exponentiation operator in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids the slower exponentiation operator in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-sol@max","model_name_or_path":"gpt-5.6-sol@max","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":9760,"startedAt":"2026-07-11T07:31:58.436Z","completedAt":"2026-07-11T07:32:08.222Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":230,"totalTokens":18067,"reasoningTokens":170,"cachedTokens":17152},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: player.Iterator() visits connected players directly without creating the temporary table returned by player.GetAll().","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here.\nend\n```\nReason: player.Iterator() visits connected players directly without creating the temporary table returned by player.GetAll()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16523,"startedAt":"2026-07-11T07:31:58.766Z","completedAt":"2026-07-11T07:32:15.333Z","answerBytes":255,"answerChars":255,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":83,"totalTokens":17917,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal ent = ents.FindByClass(\"prop_physics\")\nfor _, entity in ipairs(ent) do\n    -- Visit entity\nend\n```\nReason: Garry's Mod does not expose a public class-filtered entity iterator; `ents.FindByClass` is the supported API but builds a result table.","model_patch":"```lua\nlocal ent = ents.FindByClass(\"prop_physics\")\nfor _, entity in ipairs(ent) do\n    -- Visit entity\nend\n```\nReason: Garry's Mod does not expose a public class-filtered entity iterator; `ents.FindByClass` is the supported API but builds a result table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":15281,"startedAt":"2026-07-11T07:31:58.916Z","completedAt":"2026-07-11T07:32:14.224Z","answerBytes":202,"answerChars":202,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":74,"totalTokens":17912,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think tick.\nend)\n```\nReason: `hook.Add` registers the callback under the `MyAddon.Think` identifier for Garry's Mod's `Think` hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think tick.\nend)\n```\nReason: `hook.Add` registers the callback under the `MyAddon.Think` identifier for Garry's Mod's `Think` hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":15730,"startedAt":"2026-07-11T07:32:00.088Z","completedAt":"2026-07-11T07:32:15.835Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":70,"totalTokens":17903,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` returns true only for a non-nil, non-NULL entity that has not been removed, so calling entity methods inside the guard is safe.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` returns true only for a non-nil, non-NULL entity that has not been removed, so calling entity methods inside the guard is safe."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12279,"startedAt":"2026-07-11T07:32:00.236Z","completedAt":"2026-07-11T07:32:12.582Z","answerBytes":193,"answerChars":193,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":63,"totalTokens":17887,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server-side handler for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server-side handler for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":2374,"startedAt":"2026-07-11T07:32:01.161Z","completedAt":"2026-07-11T07:32:03.537Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":1,"usage":{"promptTokens":71,"completionTokens":0,"totalTokens":71,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11164,"startedAt":"2026-07-11T07:32:01.304Z","completedAt":"2026-07-11T07:32:12.487Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":61,"totalTokens":17902,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is fastest to read because it avoids table indexing and global lookup.","model_patch":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is fastest to read because it avoids table indexing and global lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13410,"startedAt":"2026-07-11T07:32:01.601Z","completedAt":"2026-07-11T07:32:15.042Z","answerBytes":172,"answerChars":172,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":59,"totalTokens":17890,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores job data as a DarkRP variable; this avoids depending on the legacy/general networked-string lookup.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores job data as a DarkRP variable; this avoids depending on the legacy/general networked-string lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12950,"startedAt":"2026-07-11T07:32:01.797Z","completedAt":"2026-07-11T07:32:14.793Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":71,"totalTokens":17907,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance; compare it with the squared threshold.","model_patch":"```lua\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance; compare it with the squared threshold."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":2507,"startedAt":"2026-07-11T07:32:02.544Z","completedAt":"2026-07-11T07:32:05.053Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":1,"usage":{"promptTokens":66,"completionTokens":0,"totalTokens":66,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14566,"startedAt":"2026-07-11T07:32:02.835Z","completedAt":"2026-07-11T07:32:17.403Z","answerBytes":211,"answerChars":211,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":65,"totalTokens":17914,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a direct spatial-radius query and is commonly faster for nearby-entity checks than visibility/PVS-based selection.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a direct spatial-radius query and is commonly faster for nearby-entity checks than visibility/PVS-based selection."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17905,"startedAt":"2026-07-11T07:32:03.254Z","completedAt":"2026-07-11T07:32:21.170Z","answerBytes":471,"answerChars":471,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":133,"totalTokens":17976,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(position, radius)\n    local radiusSqr = radius * radius\n    local playersNear = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(position) <= radiusSqr then\n            playersNear[#playersNear + 1] = ply\n        end\n    end\n\n    return playersNear\nend\n```\nReason: Iterating only `player.GetAll()` avoids the broader entity-sphere query and filters with squared distances, avoiding square-root work.","model_patch":"```lua\nlocal function FindPlayersNear(position, radius)\n    local radiusSqr = radius * radius\n    local playersNear = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(position) <= radiusSqr then\n            playersNear[#playersNear + 1] = ply\n        end\n    end\n\n    return playersNear\nend\n```\nReason: Iterating only `player.GetAll()` avoids the broader entity-sphere query and filters with squared distances, avoiding square-root work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5137,"startedAt":"2026-07-11T07:32:03.554Z","completedAt":"2026-07-11T07:32:08.835Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":1,"usage":{"promptTokens":65,"completionTokens":0,"totalTokens":65,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12197,"startedAt":"2026-07-11T07:32:03.650Z","completedAt":"2026-07-11T07:32:15.936Z","answerBytes":411,"answerChars":411,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17844,"completionTokens":115,"totalTokens":17959,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick; listeners iterate the player list if needed.\nhook.Run(\"MyTickPlayers\", player.GetAll())\n\n-- Slower: dispatches the hook once for every player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: The first pattern performs one hook lookup and dispatch per tick instead of one per player, reducing repeated hook-system overhead.","model_patch":"```lua\n-- Faster: one hook dispatch per tick; listeners iterate the player list if needed.\nhook.Run(\"MyTickPlayers\", player.GetAll())\n\n-- Slower: dispatches the hook once for every player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: The first pattern performs one hook lookup and dispatch per tick instead of one per player, reducing repeated hook-system overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15417,"startedAt":"2026-07-11T07:32:03.730Z","completedAt":"2026-07-11T07:32:19.420Z","answerBytes":328,"answerChars":328,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":114,"totalTokens":17953,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal health = LocalPlayer():Health()\ndraw.SimpleText(health, \"DermaLarge\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaLarge\", 20, 50, color_white)\ndraw.SimpleText(health, \"DermaLarge\", 20, 80, color_white)\n```\nReason: Cache the per-frame health value so `LocalPlayer():Health()` runs once instead of three times.","model_patch":"```lua\nlocal health = LocalPlayer():Health()\ndraw.SimpleText(health, \"DermaLarge\", 20, 20, color_white)\ndraw.SimpleText(health, \"DermaLarge\", 20, 50, color_white)\ndraw.SimpleText(health, \"DermaLarge\", 20, 80, color_white)\n```\nReason: Cache the per-frame health value so `LocalPlayer():Health()` runs once instead of three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6146,"startedAt":"2026-07-11T07:32:03.969Z","completedAt":"2026-07-11T07:32:10.252Z","answerBytes":252,"answerChars":252,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":86,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one immutable color table avoids allocating a new Color object on every iteration.","model_patch":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one immutable color table avoids allocating a new Color object on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15582,"startedAt":"2026-07-11T07:32:04.053Z","completedAt":"2026-07-11T07:32:19.787Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":70,"totalTokens":17901,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookups in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookups in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":2933,"startedAt":"2026-07-11T07:32:05.266Z","completedAt":"2026-07-11T07:32:08.321Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":1,"usage":{"promptTokens":70,"completionTokens":0,"totalTokens":70,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":2929,"startedAt":"2026-07-11T07:32:05.281Z","completedAt":"2026-07-11T07:32:08.322Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":1,"usage":{"promptTokens":91,"completionTokens":0,"totalTokens":91,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16224,"startedAt":"2026-07-11T07:32:05.700Z","completedAt":"2026-07-11T07:32:21.927Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":57,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Passing `ply` explicitly avoids a metatable method lookup and implicit `self` argument handling, so it is generally faster for helpers you control.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Passing `ply` explicitly avoids a metatable method lookup and implicit `self` argument handling, so it is generally faster for helpers you control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13885,"startedAt":"2026-07-11T07:32:05.919Z","completedAt":"2026-07-11T07:32:19.807Z","answerBytes":149,"answerChars":145,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":52,"totalTokens":17885,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN is Garry's Mod’s native console-output function and avoids print’s extra Lua-side formatting overhead.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN is Garry's Mod’s native console-output function and avoids print’s extra Lua-side formatting overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14562,"startedAt":"2026-07-11T07:32:06.890Z","completedAt":"2026-07-11T07:32:21.624Z","answerBytes":250,"answerChars":250,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":84,"totalTokens":17925,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A numeric `for` over a dense sequential table avoids the iterator-call overhead of `pairs` and `ipairs`; `pairs` is also unordered and may visit non-array keys.","model_patch":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A numeric `for` over a dense sequential table avoids the iterator-call overhead of `pairs` and `ipairs`; `pairs` is also unordered and may visit non-array keys."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15108,"startedAt":"2026-07-11T07:32:06.997Z","completedAt":"2026-07-11T07:32:22.359Z","answerBytes":703,"answerChars":703,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17851,"completionTokens":202,"totalTokens":18053,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Faster for a one-off pipeline: one direct loop, no fn closures/intermediate tables.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\n-- Instead of:\n-- fn.map(fn.filter(players, function(p) return IsValid(p) and p:Alive() end),\n--        function(p) return p:Nick() end)\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A single indexed loop avoids combinator callback dispatch, closure overhead, and the intermediate filtered table.","model_patch":"```lua\n-- Faster for a one-off pipeline: one direct loop, no fn closures/intermediate tables.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\n-- Instead of:\n-- fn.map(fn.filter(players, function(p) return IsValid(p) and p:Alive() end),\n--        function(p) return p:Nick() end)\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A single indexed loop avoids combinator callback dispatch, closure overhead, and the intermediate filtered table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12960,"startedAt":"2026-07-11T07:32:07.432Z","completedAt":"2026-07-11T07:32:20.452Z","answerBytes":746,"answerChars":746,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17852,"completionTokens":207,"totalTokens":18059,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshCachedPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayersOnJoin\", function()\n    -- Run after the player has entered player.GetAll().\n    timer.Simple(0, refreshCachedPlayers)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayersOnLeave\", function()\n    refreshCachedPlayers()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-tick player work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list once per join or leave instead of on every tick, while numeric indexing avoids `ipairs` iterator overhead.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshCachedPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayersOnJoin\", function()\n    -- Run after the player has entered player.GetAll().\n    timer.Simple(0, refreshCachedPlayers)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayersOnLeave\", function()\n    refreshCachedPlayers()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-tick player work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list once per join or leave instead of on every tick, while numeric indexing avoids `ipairs` iterator overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15172,"startedAt":"2026-07-11T07:32:08.361Z","completedAt":"2026-07-11T07:32:23.543Z","answerBytes":418,"answerChars":418,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":125,"totalTokens":17958,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal Player = FindMetaTable(\"Player\")\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nfunction Player:SetTempValue(value)\n    playerData[self] = value\nend\n\nfunction Player:GetTempValue()\n    return playerData[self]\nend\n\n-- Hot-path read:\nlocal value = playerData[ply]\n```\nReason: A plain side table avoids Player metatable field lookup and keeps temporary Lua-side state separate from the engine entity.","model_patch":"```lua\nlocal Player = FindMetaTable(\"Player\")\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nfunction Player:SetTempValue(value)\n    playerData[self] = value\nend\n\nfunction Player:GetTempValue()\n    return playerData[self]\nend\n\n-- Hot-path read:\nlocal value = playerData[ply]\n```\nReason: A plain side table avoids Player metatable field lookup and keeps temporary Lua-side state separate from the engine entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13712,"startedAt":"2026-07-11T07:32:08.369Z","completedAt":"2026-07-11T07:32:22.136Z","answerBytes":480,"answerChars":480,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":150,"totalTokens":17986,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: a sequential number-indexed array.\nlocal values = { \"alpha\", \"bravo\", \"charlie\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n\n-- Slower for fixed ordered iteration: string-keyed map.\nlocal valuesByName = {\n    first = \"alpha\",\n    second = \"bravo\",\n    third = \"charlie\",\n}\n```\nReason: Sequential integer keys use Lua's array part and support a tight indexed loop; string-keyed maps require hash-table lookup and unordered traversal.","model_patch":"```lua\n-- Faster: a sequential number-indexed array.\nlocal values = { \"alpha\", \"bravo\", \"charlie\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n\n-- Slower for fixed ordered iteration: string-keyed map.\nlocal valuesByName = {\n    first = \"alpha\",\n    second = \"bravo\",\n    third = \"charlie\",\n}\n```\nReason: Sequential integer keys use Lua's array part and support a tight indexed loop; string-keyed maps require hash-table lookup and unordered traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9429,"startedAt":"2026-07-11T07:32:08.370Z","completedAt":"2026-07-11T07:32:17.919Z","answerBytes":223,"answerChars":223,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":70,"totalTokens":17913,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster in a hot draw path: avoid constructing/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Separate numeric arguments avoid Color-object table access and argument unpacking overhead.","model_patch":"```lua\n-- Faster in a hot draw path: avoid constructing/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Separate numeric arguments avoid Color-object table access and argument unpacking overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9419,"startedAt":"2026-07-11T07:32:08.498Z","completedAt":"2026-07-11T07:32:17.919Z","answerBytes":251,"answerChars":251,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17857,"completionTokens":72,"totalTokens":17929,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips, so it is typically lower latency for a single server with no cross-server synchronization need.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips, so it is typically lower latency for a single server with no cross-server synchronization need."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14762,"startedAt":"2026-07-11T07:32:08.858Z","completedAt":"2026-07-11T07:32:23.757Z","answerBytes":472,"answerChars":472,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":151,"totalTokens":17985,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak player keys\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId == nil then\n        steamId = ply:SteamID()\n        steamIdCache[ply] = steamId\n    end\n    return steamId\nend\n\n-- Hot path:\nlocal steamId = GetSteamIDCached(ply)\n```\nReason: It calls `ply:SteamID()` once per player and uses weak keys so disconnected player objects are not kept alive by the cache.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak player keys\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId == nil then\n        steamId = ply:SteamID()\n        steamIdCache[ply] = steamId\n    end\n    return steamId\nend\n\n-- Hot path:\nlocal steamId = GetSteamIDCached(ply)\n```\nReason: It calls `ply:SteamID()` once per player and uses weak keys so disconnected player objects are not kept alive by the cache."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15201,"startedAt":"2026-07-11T07:32:10.254Z","completedAt":"2026-07-11T07:32:25.456Z","answerBytes":419,"answerChars":419,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":134,"totalTokens":17967,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\" .. i\nend\n\n-- Slow: creates a new increasingly large string on every iteration.\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Fast: joins all pieces in one operation.\nlocal fast = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the growing string, so it performs far fewer allocations and copies.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\" .. i\nend\n\n-- Slow: creates a new increasingly large string on every iteration.\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Fast: joins all pieces in one operation.\nlocal fast = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the growing string, so it performs far fewer allocations and copies."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8421,"startedAt":"2026-07-11T07:32:11.365Z","completedAt":"2026-07-11T07:32:19.787Z","answerBytes":187,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":64,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding `draw.RoundedBox`’s rounding/setup overhead when the corner radius is zero.","model_patch":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding `draw.RoundedBox`’s rounding/setup overhead when the corner radius is zero."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15326,"startedAt":"2026-07-11T07:32:12.076Z","completedAt":"2026-07-11T07:32:27.571Z","answerBytes":563,"answerChars":563,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":178,"totalTokens":18016,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Set these once (for example, during initialization).\nsurface.CreateFont(\"HudFast\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n})\n\n-- In HUDPaint: surface text helpers avoid draw.DrawText/SimpleTextOutlined overhead.\nsurface.SetFont(\"HudFast\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(24, 24)\nsurface.DrawText(\"Health: 100\")\n```\nReason: For a single unoutlined line, surface.SetFont/SetTextColor/SetTextPos/DrawText is the lower-overhead path; cache the font setup and avoid SimpleTextOutlined unless you need its outline.","model_patch":"```lua\n-- Set these once (for example, during initialization).\nsurface.CreateFont(\"HudFast\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n})\n\n-- In HUDPaint: surface text helpers avoid draw.DrawText/SimpleTextOutlined overhead.\nsurface.SetFont(\"HudFast\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(24, 24)\nsurface.DrawText(\"Health: 100\")\n```\nReason: For a single unoutlined line, surface.SetFont/SetTextColor/SetTextPos/DrawText is the lower-overhead path; cache the font setup and avoid SimpleTextOutlined unless you need its outline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11247,"startedAt":"2026-07-11T07:32:12.291Z","completedAt":"2026-07-11T07:32:23.543Z","answerBytes":114,"answerChars":114,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":44,"totalTokens":17874,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: `#` is the preferred length operator for a sequential array-like table.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: `#` is the preferred length operator for a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5407,"startedAt":"2026-07-11T07:32:12.580Z","completedAt":"2026-07-11T07:32:18.001Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":78,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster when you can replace the reference:\nt = {}\n```\nReason: `t = {}` allocates a new empty table, while `table.Empty(t)` iterates through and removes the existing entries; use `table.Empty` only when other code must retain the same table reference.","model_patch":"```lua\n-- Faster when you can replace the reference:\nt = {}\n```\nReason: `t = {}` allocates a new empty table, while `table.Empty(t)` iterates through and removes the existing entries; use `table.Empty` only when other code must retain the same table reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22798,"startedAt":"2026-07-11T07:32:12.593Z","completedAt":"2026-07-11T07:32:35.631Z","answerBytes":528,"answerChars":528,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":163,"totalTokens":17996,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Slower: scans every element in an array-like list (O(n)).\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, playerRole) then\n    -- allowed\nend\n\n-- Faster: use the values as keys for constant-time membership lookup (O(1) average).\nlocal allowedRoles = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowedRoles[playerRole] then\n    -- allowed\nend\n```\nReason: `table.HasValue` linearly scans a list, while a key-based set performs an average constant-time hash lookup.","model_patch":"```lua\n-- Slower: scans every element in an array-like list (O(n)).\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, playerRole) then\n    -- allowed\nend\n\n-- Faster: use the values as keys for constant-time membership lookup (O(1) average).\nlocal allowedRoles = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowedRoles[playerRole] then\n    -- allowed\nend\n```\nReason: `table.HasValue` linearly scans a list, while a key-based set performs an average constant-time hash lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23112,"startedAt":"2026-07-11T07:32:14.233Z","completedAt":"2026-07-11T07:32:37.501Z","answerBytes":466,"answerChars":466,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":132,"totalTokens":17964,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: build known fields directly in the constructor.\nlocal playerState = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n\n-- Slower: allocate an empty table, then perform separate field assignments.\n-- local playerState = {}\n-- playerState.health = 100\n-- playerState.armor = 50\n-- playerState.alive = true\n```\nReason: A table constructor initializes the known fields as part of table creation, avoiding the separate post-allocation assignments.","model_patch":"```lua\n-- Faster: build known fields directly in the constructor.\nlocal playerState = {\n    health = 100,\n    armor = 50,\n    alive = true,\n}\n\n-- Slower: allocate an empty table, then perform separate field assignments.\n-- local playerState = {}\n-- playerState.health = 100\n-- playerState.armor = 50\n-- playerState.alive = true\n```\nReason: A table constructor initializes the known fields as part of table creation, avoiding the separate post-allocation assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18280,"startedAt":"2026-07-11T07:32:14.795Z","completedAt":"2026-07-11T07:32:33.083Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":59,"totalTokens":17891,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a dense sequential table, indexing a random integer directly avoids table.Random's extra table-shape handling and function-call overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a dense sequential table, indexing a random integer directly avoids table.Random's extra table-shape handling and function-call overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20637,"startedAt":"2026-07-11T07:32:15.076Z","completedAt":"2026-07-11T07:32:35.828Z","answerBytes":128,"answerChars":128,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17825,"completionTokens":44,"totalTokens":17869,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the idiomatic, fastest form and avoids function-call overhead.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the idiomatic, fastest form and avoids function-call overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-terra@low","model_name_or_path":"gpt-5.6-terra@low","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":20460,"startedAt":"2026-07-11T07:32:15.418Z","completedAt":"2026-07-11T07:32:36.041Z","answerBytes":189,"answerChars":189,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":59,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`. ","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24957,"startedAt":"2026-07-11T07:32:15.907Z","completedAt":"2026-07-11T07:32:40.903Z","answerBytes":302,"answerChars":302,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":94,"totalTokens":17926,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal entity = ents.Iterator()\n\nwhile true do\n    entity = entity()\n    if not IsValid(entity) then break end\n\n    if entity:GetClass() == \"prop_physics\" then\n        -- Handle entity\n    end\nend\n```\nReason: `ents.Iterator()` iterates entities lazily, avoiding allocation of a full entity table.","model_patch":"```lua\nlocal entity = ents.Iterator()\n\nwhile true do\n    entity = entity()\n    if not IsValid(entity) then break end\n\n    if entity:GetClass() == \"prop_physics\" then\n        -- Handle entity\n    end\nend\n```\nReason: `ents.Iterator()` iterates entities lazily, avoiding allocation of a full entity table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":20218,"startedAt":"2026-07-11T07:32:15.992Z","completedAt":"2026-07-11T07:32:36.257Z","answerBytes":202,"answerChars":202,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":74,"totalTokens":17912,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think hook.\nend)\n```\nReason: `hook.Add` registers the callback for Garry's Mod's `Think` hook under the identifier `MyAddon.Think`.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think hook.\nend)\n```\nReason: `hook.Add` registers the callback for Garry's Mod's `Think` hook under the identifier `MyAddon.Think`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":22928,"startedAt":"2026-07-11T07:32:16.245Z","completedAt":"2026-07-11T07:32:39.585Z","answerBytes":170,"answerChars":170,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":62,"totalTokens":17895,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` confirms the reference is a valid entity (not nil, NULL, or removed) before calling entity methods.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` confirms the reference is a valid entity (not nil, NULL, or removed) before calling entity methods."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12818,"startedAt":"2026-07-11T07:32:17.611Z","completedAt":"2026-07-11T07:32:30.569Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":65,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server or client handler for an incoming net message by name.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server or client handler for an incoming net message by name."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":22692,"startedAt":"2026-07-11T07:32:17.987Z","completedAt":"2026-07-11T07:32:40.897Z","answerBytes":321,"answerChars":321,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":100,"totalTokens":17934,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal zeroAngle = angle_zero\n\n-- Hot path: reuse the shared immutable zero angle.\nentity:SetAngles(zeroAngle)\n\n-- Slower: allocates a new Angle object every call.\n-- entity:SetAngles(Angle())\n```\nReason: `angle_zero` is Garry's Mod's shared zeroed `Angle`, avoiding per-call allocation and garbage-collection work.","model_patch":"```lua\nlocal zeroAngle = angle_zero\n\n-- Hot path: reuse the shared immutable zero angle.\nentity:SetAngles(zeroAngle)\n\n-- Slower: allocates a new Angle object every call.\n-- entity:SetAngles(Angle())\n```\nReason: `angle_zero` is Garry's Mod's shared zeroed `Angle`, avoiding per-call allocation and garbage-collection work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23135,"startedAt":"2026-07-11T07:32:18.000Z","completedAt":"2026-07-11T07:32:41.356Z","answerBytes":263,"answerChars":263,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":78,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is faster to read than nested table indexing because it avoids table lookups; use a flat module-local value when the setting does not need dynamic mutation.","model_patch":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is faster to read than nested table indexing because it avoids table lookups; use a flat module-local value when the setting does not need dynamic mutation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20690,"startedAt":"2026-07-11T07:32:18.159Z","completedAt":"2026-07-11T07:32:38.957Z","answerBytes":339,"answerChars":339,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":108,"totalTokens":17941,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Preferred: DarkRP's job accessor\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job data:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP stores and synchronizes job data through its DarkRPVar system, so `getDarkRPVar(\"job\")` is the supported accessor and stays aligned with DarkRP's internal contract.","model_patch":"```lua\n-- Preferred: DarkRP's job accessor\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job data:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP stores and synchronizes job data through its DarkRPVar system, so `getDarkRPVar(\"job\")` is the supported accessor and stays aligned with DarkRP's internal contract."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15886,"startedAt":"2026-07-11T07:32:19.421Z","completedAt":"2026-07-11T07:32:35.310Z","answerBytes":234,"answerChars":234,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":72,"totalTokens":17904,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= threshold * threshold then\n    -- vectors are within the threshold\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance; square the threshold for the comparison.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= threshold * threshold then\n    -- vectors are within the threshold\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance; square the threshold for the comparison."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12689,"startedAt":"2026-07-11T07:32:19.847Z","completedAt":"2026-07-11T07:32:32.586Z","answerBytes":202,"answerChars":202,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":61,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor _, entity in ents.Iterator() do\n    -- Process entity\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator for visiting every entity on supported Garry's Mod versions.","model_patch":"```lua\nfor _, entity in ents.Iterator() do\n    -- Process entity\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator for visiting every entity on supported Garry's Mod versions."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":19940,"startedAt":"2026-07-11T07:32:19.852Z","completedAt":"2026-07-11T07:32:39.952Z","answerBytes":206,"answerChars":206,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":65,"totalTokens":17914,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for entities within a fixed radius, without relying on PVS visibility behavior.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for entities within a fixed radius, without relying on PVS visibility behavior."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19822,"startedAt":"2026-07-11T07:32:19.861Z","completedAt":"2026-07-11T07:32:39.953Z","answerBytes":377,"answerChars":377,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":117,"totalTokens":17958,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal nearby = player.GetAll()\nlocal radiusSqr = radius * radius\n\nfor i = #nearby, 1, -1 do\n    if nearby[i]:GetPos():DistToSqr(position) > radiusSqr then\n        table.remove(nearby, i)\n    end\nend\n```\nReason: `player.GetAll()` limits the scan to players, avoiding entity enumeration; squared-distance checks avoid the square root used by ordinary distance comparisons.","model_patch":"```lua\nlocal nearby = player.GetAll()\nlocal radiusSqr = radius * radius\n\nfor i = #nearby, 1, -1 do\n    if nearby[i]:GetPos():DistToSqr(position) > radiusSqr then\n        table.remove(nearby, i)\n    end\nend\n```\nReason: `player.GetAll()` limits the scan to players, avoiding entity enumeration; squared-distance checks avoid the square root used by ordinary distance comparisons."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18641,"startedAt":"2026-07-11T07:32:20.661Z","completedAt":"2026-07-11T07:32:39.409Z","answerBytes":225,"answerChars":225,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":73,"totalTokens":17911,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` is generally faster in Garry's Mod Lua because its counter, limit, and increment are handled by the VM rather than through explicit Lua-level loop control.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` is generally faster in Garry's Mod Lua because its counter, limit, and increment are handled by the VM rather than through explicit Lua-level loop control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24102,"startedAt":"2026-07-11T07:32:21.196Z","completedAt":"2026-07-11T07:32:45.391Z","answerBytes":442,"answerChars":442,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17848,"completionTokens":120,"totalTokens":17968,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, with the player list as an argument.\nlocal players = player.GetAll()\nhook.Run(\"MyTickPlayers\", players)\n\n-- Slower: repeats hook lookup/dispatch once for every player.\nfor _, ply in ipairs(players) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: A single hook dispatch avoids repeating hook lookup and listener iteration for every player; listeners can iterate the provided player list once.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, with the player list as an argument.\nlocal players = player.GetAll()\nhook.Run(\"MyTickPlayers\", players)\n\n-- Slower: repeats hook lookup/dispatch once for every player.\nfor _, ply in ipairs(players) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: A single hook dispatch avoids repeating hook lookup and listener iteration for every player; listeners can iterate the provided player list once."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18198,"startedAt":"2026-07-11T07:32:21.650Z","completedAt":"2026-07-11T07:32:40.019Z","answerBytes":447,"answerChars":447,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":148,"totalTokens":17987,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaLarge\", 20, 20)\n    surface.DrawRect(20, 60, health * 2, 20)\n    draw.SimpleTextOutlined(health, \"DermaDefault\", 20, 90, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black)\nend)\n```\nReason: Cache the player health once per frame and reuse it, avoiding two redundant Lua-to-engine method calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaLarge\", 20, 20)\n    surface.DrawRect(20, 60, health * 2, 20)\n    draw.SimpleTextOutlined(health, \"DermaDefault\", 20, 90, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black)\nend)\n```\nReason: Cache the player health once per frame and reuse it, avoiding two redundant Lua-to-engine method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17622,"startedAt":"2026-07-11T07:32:21.962Z","completedAt":"2026-07-11T07:32:39.749Z","answerBytes":214,"answerChars":214,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":77,"totalTokens":17906,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint item\nend\n```\nReason: Creating the color once avoids allocating a new Color object on every loop iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint item\nend\n```\nReason: Creating the color once avoids allocating a new Color object on every loop iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19939,"startedAt":"2026-07-11T07:32:22.138Z","completedAt":"2026-07-11T07:32:42.084Z","answerBytes":172,"answerChars":172,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":70,"totalTokens":17899,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21293,"startedAt":"2026-07-11T07:32:22.138Z","completedAt":"2026-07-11T07:32:43.433Z","answerBytes":383,"answerChars":383,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":109,"totalTokens":17943,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal cachedLocalPlayer\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Hot-path usage:\nif IsValid(cachedLocalPlayer) then\n    local position = cachedLocalPlayer:GetPos()\nend\n```\nReason: Cache the player reference once per frame and reuse it in hot paths, while updating it after the client entity becomes available or changes.","model_patch":"```lua\nlocal cachedLocalPlayer\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Hot-path usage:\nif IsValid(cachedLocalPlayer) then\n    local position = cachedLocalPlayer:GetPos()\nend\n```\nReason: Cache the player reference once per frame and reuse it in hot paths, while updating it after the client entity becomes available or changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":20936,"startedAt":"2026-07-11T07:32:22.443Z","completedAt":"2026-07-11T07:32:43.433Z","answerBytes":412,"answerChars":412,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17850,"completionTokens":128,"totalTokens":17978,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal function RoughlyLookingAtEachOther(a, b, threshold)\n    threshold = threshold or 0.7\n\n    local aAim = a:GetAimVector()\n    local bAim = b:GetAimVector()\n\n    -- Dot is -1 when directions are opposite (facing one another), +1 when aligned.\n    return aAim:Dot(bAim) <= -threshold\nend\n```\nReason: A dot product avoids the expensive `math.acos`; compare it directly against a cosine-derived threshold.","model_patch":"```lua\nlocal function RoughlyLookingAtEachOther(a, b, threshold)\n    threshold = threshold or 0.7\n\n    local aAim = a:GetAimVector()\n    local bAim = b:GetAimVector()\n\n    -- Dot is -1 when directions are opposite (facing one another), +1 when aligned.\n    return aAim:Dot(bAim) <= -threshold\nend\n```\nReason: A dot product avoids the expensive `math.acos`; compare it directly against a cosine-derived threshold."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19270,"startedAt":"2026-07-11T07:32:23.544Z","completedAt":"2026-07-11T07:32:43.002Z","answerBytes":141,"answerChars":141,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":48,"totalTokens":17886,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Passing `ply` explicitly avoids a metatable method lookup and is generally faster for helpers you control.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Passing `ply` explicitly avoids a metatable method lookup and is generally faster for helpers you control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19414,"startedAt":"2026-07-11T07:32:23.544Z","completedAt":"2026-07-11T07:32:42.960Z","answerBytes":128,"answerChars":126,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":50,"totalTokens":17883,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes directly to the console and avoids `print`’s argument formatting overhead.","model_patch":"```lua\nMsg(\"debug line\\n\")\n```\nReason: `Msg` writes directly to the console and avoids `print`’s argument formatting overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15406,"startedAt":"2026-07-11T07:32:23.760Z","completedAt":"2026-07-11T07:32:39.169Z","answerBytes":197,"answerChars":197,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":72,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A numeric `for` avoids the iterator-function overhead of `pairs` and `ipairs` for a dense sequential array.","model_patch":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A numeric `for` avoids the iterator-function overhead of `pairs` and `ipairs` for a dense sequential array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17968,"startedAt":"2026-07-11T07:32:25.462Z","completedAt":"2026-07-11T07:32:43.432Z","answerBytes":585,"answerChars":585,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17851,"completionTokens":199,"totalTokens":18050,"reasoningTokens":35,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster than chaining DarkRP.fn.Select/Map: one pass, no intermediate tables/callback layers.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A single indexed loop avoids combinator callbacks and intermediate tables, reducing allocations and function-call overhead.","model_patch":"```lua\n-- Faster than chaining DarkRP.fn.Select/Map: one pass, no intermediate tables/callback layers.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A single indexed loop avoids combinator callbacks and intermediate tables, reducing allocations and function-call overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20124,"startedAt":"2026-07-11T07:32:27.573Z","completedAt":"2026-07-11T07:32:47.700Z","answerBytes":592,"answerChars":592,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17852,"completionTokens":169,"totalTokens":18021,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayers\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayers\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-tick player work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds a player list, so refreshing it only on join or leave avoids that work every tick while keeping the cache current.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayers\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayers\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-tick player work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds a player list, so refreshing it only on join or leave avoids that work every tick while keeping the cache current."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":19429,"startedAt":"2026-07-11T07:32:28.365Z","completedAt":"2026-07-11T07:32:47.828Z","answerBytes":574,"answerChars":574,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":161,"totalTokens":17994,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Dense numeric keys avoid repeated string-key lookup and keep the hot path compact.\nlocal IDX_SOME_FIELD = 1\n\nlocal function SetSomeField(ply, value)\n    local data = ply.__hotData\n    if not data then\n        data = {}\n        ply.__hotData = data\n    end\n    data[IDX_SOME_FIELD] = value\nend\n\nlocal function GetSomeField(ply)\n    return ply.__hotData[IDX_SOME_FIELD]\nend\n```\nReason: A per-player table with numeric indexes is typically faster to read than a string-named player field because numeric table access is cheaper and avoids repeated string-key hashing.","model_patch":"```lua\n-- Dense numeric keys avoid repeated string-key lookup and keep the hot path compact.\nlocal IDX_SOME_FIELD = 1\n\nlocal function SetSomeField(ply, value)\n    local data = ply.__hotData\n    if not data then\n        data = {}\n        ply.__hotData = data\n    end\n    data[IDX_SOME_FIELD] = value\nend\n\nlocal function GetSomeField(ply)\n    return ply.__hotData[IDX_SOME_FIELD]\nend\n```\nReason: A per-player table with numeric indexes is typically faster to read than a string-named player field because numeric table access is cheaper and avoids repeated string-key hashing."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18278,"startedAt":"2026-07-11T07:32:28.899Z","completedAt":"2026-07-11T07:32:47.185Z","answerBytes":265,"answerChars":265,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":89,"totalTokens":17927,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal values = { \"alpha\", \"bravo\", \"charlie\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A sequential number-indexed array has an optimized contiguous array part and avoids hash lookups required by string-keyed maps.","model_patch":"```lua\nlocal values = { \"alpha\", \"bravo\", \"charlie\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: A sequential number-indexed array has an optimized contiguous array part and avoids hash lookups required by string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13057,"startedAt":"2026-07-11T07:32:30.368Z","completedAt":"2026-07-11T07:32:43.433Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":65,"totalTokens":17906,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Hot path: avoid constructing/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate numeric channels avoids Color-table allocation and table argument handling.","model_patch":"```lua\n-- Hot path: avoid constructing/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate numeric channels avoids Color-table allocation and table argument handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":26788,"startedAt":"2026-07-11T07:32:30.571Z","completedAt":"2026-07-11T07:32:57.363Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17857,"completionTokens":68,"totalTokens":17925,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips and is typically lower latency for a single server without cross-server synchronization.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips and is typically lower latency for a single server without cross-server synchronization."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13100,"startedAt":"2026-07-11T07:32:32.598Z","completedAt":"2026-07-11T07:32:45.701Z","answerBytes":505,"answerChars":505,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":152,"totalTokens":17984,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak keys: players can be collected\n\nlocal function SteamIDCached(ply)\n    local steamID = steamIdCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = SteamIDCached(ply)\n```\nReason: SteamID is stable for a connected player, so this avoids repeated method calls while weak keys prevent the cache from retaining player objects.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak keys: players can be collected\n\nlocal function SteamIDCached(ply)\n    local steamID = steamIdCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = SteamIDCached(ply)\n```\nReason: SteamID is stable for a connected player, so this avoids repeated method calls while weak keys prevent the cache from retaining player objects."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":19927,"startedAt":"2026-07-11T07:32:33.085Z","completedAt":"2026-07-11T07:32:53.016Z","answerBytes":267,"answerChars":267,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":93,"totalTokens":17928,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts, \"\")\n```\nReason: `table.concat` builds the final string once, avoiding the repeated allocations and copying caused by `result = result .. piece` in a loop.","model_patch":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts, \"\")\n```\nReason: `table.concat` builds the final string once, avoiding the repeated allocations and copying caused by `result = result .. piece` in a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17917,"startedAt":"2026-07-11T07:32:35.414Z","completedAt":"2026-07-11T07:32:53.653Z","answerBytes":173,"answerChars":173,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":57,"totalTokens":17896,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nsurface.DrawRect(x, y, width, height)\n```\nReason: It draws the rectangle directly and avoids draw.RoundedBox's extra Lua-side wrapper work when no rounding is needed.","model_patch":"```lua\nsurface.DrawRect(x, y, width, height)\n```\nReason: It draws the rectangle directly and avoids draw.RoundedBox's extra Lua-side wrapper work when no rounding is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20563,"startedAt":"2026-07-11T07:32:35.828Z","completedAt":"2026-07-11T07:32:56.639Z","answerBytes":423,"answerChars":423,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":128,"totalTokens":17962,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster for a single line: avoid draw.DrawText / draw.SimpleTextOutlined overhead.\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(\"Status: ready\")\n```\nReason: surface.SetFont + SetTextColor + SetTextPos + DrawText is the lower-level surface path and avoids the extra alignment, table, and outline work in draw.DrawText or draw.SimpleTextOutlined.","model_patch":"```lua\n-- Faster for a single line: avoid draw.DrawText / draw.SimpleTextOutlined overhead.\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(\"Status: ready\")\n```\nReason: surface.SetFont + SetTextColor + SetTextPos + DrawText is the lower-level surface path and avoids the extra alignment, table, and outline work in draw.DrawText or draw.SimpleTextOutlined."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7857,"startedAt":"2026-07-11T07:32:36.040Z","completedAt":"2026-07-11T07:32:44.044Z","answerBytes":109,"answerChars":109,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":42,"totalTokens":17870,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal length = #tbl\n```\nReason: `#` is the preferred length operator for sequential array-like tables.","model_patch":"```lua\nlocal length = #tbl\n```\nReason: `#` is the preferred length operator for sequential array-like tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17042,"startedAt":"2026-07-11T07:32:36.152Z","completedAt":"2026-07-11T07:32:53.556Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":68,"totalTokens":17903,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster when you can replace the table reference:\nt = {}\n```\nReason: `t = {}` avoids iterating over and clearing every existing entry; use `table.Empty(t)` only when other code must keep the same table object.","model_patch":"```lua\n-- Faster when you can replace the table reference:\nt = {}\n```\nReason: `t = {}` avoids iterating over and clearing every existing entry; use `table.Empty(t)` only when other code must keep the same table object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18426,"startedAt":"2026-07-11T07:32:36.814Z","completedAt":"2026-07-11T07:32:55.560Z","answerBytes":458,"answerChars":458,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":150,"totalTokens":17983,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Slow: table.HasValue scans every element (O(n)).\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, userGroup) then\n    -- allowed\nend\n\n-- Fast: use keys as a set for average O(1) lookup.\nlocal allowedGroups = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowedGroups[userGroup] then\n    -- allowed\nend\n```\nReason: Keyed-table lookups avoid the linear scan that table.HasValue performs on a list.","model_patch":"```lua\n-- Slow: table.HasValue scans every element (O(n)).\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, userGroup) then\n    -- allowed\nend\n\n-- Fast: use keys as a set for average O(1) lookup.\nlocal allowedGroups = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowedGroups[userGroup] then\n    -- allowed\nend\n```\nReason: Keyed-table lookups avoid the linear scan that table.HasValue performs on a list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19232,"startedAt":"2026-07-11T07:32:37.574Z","completedAt":"2026-07-11T07:32:56.981Z","answerBytes":387,"answerChars":387,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":117,"totalTokens":17949,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: allocate and initialize in one table constructor.\nlocal playerState = {\n    health = 100,\n    armor = 0,\n    alive = true,\n}\n\n-- Slower:\n-- local playerState = {}\n-- playerState.health = 100\n-- playerState.armor = 0\n-- playerState.alive = true\n```\nReason: The table constructor performs initialization as part of creation, avoiding separate field-assignment operations.","model_patch":"```lua\n-- Faster: allocate and initialize in one table constructor.\nlocal playerState = {\n    health = 100,\n    armor = 0,\n    alive = true,\n}\n\n-- Slower:\n-- local playerState = {}\n-- playerState.health = 100\n-- playerState.armor = 0\n-- playerState.alive = true\n```\nReason: The table constructor performs initialization as part of creation, avoiding separate field-assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22176,"startedAt":"2026-07-11T07:32:38.978Z","completedAt":"2026-07-11T07:33:01.888Z","answerBytes":149,"answerChars":149,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":50,"totalTokens":17878,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct indexing avoids table.Random's extra table traversal/work.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct indexing avoids table.Random's extra table traversal/work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12794,"startedAt":"2026-07-11T07:32:39.584Z","completedAt":"2026-07-11T07:32:53.081Z","answerBytes":113,"answerChars":113,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17827,"completionTokens":42,"totalTokens":17869,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of exponentiation for a fixed square.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of exponentiation for a fixed square."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-terra@medium","model_name_or_path":"gpt-5.6-terra@medium","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":21323,"startedAt":"2026-07-11T07:32:39.710Z","completedAt":"2026-07-11T07:33:01.622Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":59,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15545,"startedAt":"2026-07-11T07:32:39.886Z","completedAt":"2026-07-11T07:32:55.937Z","answerBytes":243,"answerChars":243,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":78,"totalTokens":17912,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Use ent here\n    end\nend\n```\nReason: `ents.Iterator()` visits entities incrementally, avoiding allocation of a full entity table from `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Use ent here\n    end\nend\n```\nReason: `ents.Iterator()` visits entities incrementally, avoiding allocation of a full entity table from `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":17820,"startedAt":"2026-07-11T07:32:39.923Z","completedAt":"2026-07-11T07:32:58.207Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":73,"totalTokens":17909,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think hook\nend)\n```\nReason: `hook.Add` registers the callback for Garry's Mod's `Think` hook under the `MyAddon.Think` identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Runs every Think hook\nend)\n```\nReason: `hook.Add` registers the callback for Garry's Mod's `Think` hook under the `MyAddon.Think` identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":16870,"startedAt":"2026-07-11T07:32:39.950Z","completedAt":"2026-07-11T07:32:57.253Z","answerBytes":168,"answerChars":168,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":60,"totalTokens":17893,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` confirms the reference is a valid entity and not a NULL/removed entity before methods are called.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` confirms the reference is a valid entity and not a NULL/removed entity before methods are called."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18843,"startedAt":"2026-07-11T07:32:40.096Z","completedAt":"2026-07-11T07:32:59.378Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":61,"totalTokens":17889,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":18981,"startedAt":"2026-07-11T07:32:40.136Z","completedAt":"2026-07-11T07:32:59.863Z","answerBytes":410,"answerChars":410,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":124,"totalTokens":17958,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- Hot path: reuse the engine-provided shared zero angle.\nlocal function applyNeutralRotation(ent)\n    ent:SetAngles(ZERO_ANGLE)\nend\n\n-- Avoid in hot paths:\n-- ent:SetAngles(Angle()) -- allocates a new Angle object each call\n```\nReason: `angle_zero` is the shared engine-provided `(0, 0, 0)` Angle, so reusing it avoids per-call Angle allocation and construction overhead.","model_patch":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- Hot path: reuse the engine-provided shared zero angle.\nlocal function applyNeutralRotation(ent)\n    ent:SetAngles(ZERO_ANGLE)\nend\n\n-- Avoid in hot paths:\n-- ent:SetAngles(Angle()) -- allocates a new Angle object each call\n```\nReason: `angle_zero` is the shared engine-provided `(0, 0, 0)` Angle, so reusing it avoids per-call Angle allocation and construction overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15886,"startedAt":"2026-07-11T07:32:40.154Z","completedAt":"2026-07-11T07:32:56.733Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":66,"totalTokens":17903,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is faster to read than a nested table lookup because it avoids global and table indexing operations.","model_patch":"```lua\nlocal myaddon_color = Color(255, 255, 255)\nlocal color = myaddon_color\n```\nReason: A local variable is faster to read than a nested table lookup because it avoids global and table indexing operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":16726,"startedAt":"2026-07-11T07:32:41.152Z","completedAt":"2026-07-11T07:32:58.273Z","answerBytes":346,"answerChars":346,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":111,"totalTokens":17944,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Preferred: DarkRP's job table is authoritative and avoids networked-string state.\nlocal jobName = team.GetName(ply:Team())\n\n-- Avoid for job identity:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `team.GetName(ply:Team())` reads DarkRP's current team/job directly; the `\"job\"` networked string is not the authoritative job API.","model_patch":"```lua\n-- Preferred: DarkRP's job table is authoritative and avoids networked-string state.\nlocal jobName = team.GetName(ply:Team())\n\n-- Avoid for job identity:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `team.GetName(ply:Team())` reads DarkRP's current team/job directly; the `\"job\"` networked string is not the authoritative job API."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19712,"startedAt":"2026-07-11T07:32:41.211Z","completedAt":"2026-07-11T07:33:01.567Z","answerBytes":203,"answerChars":203,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":66,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= threshold * threshold then\n    -- vectors are within threshold\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for an actual distance comparison.","model_patch":"```lua\nif posA:DistToSqr(posB) <= threshold * threshold then\n    -- vectors are within threshold\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for an actual distance comparison."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11944,"startedAt":"2026-07-11T07:32:41.445Z","completedAt":"2026-07-11T07:32:54.020Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":59,"totalTokens":17891,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- use ent\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator for visiting every entity when the order is not important.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- use ent\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator for visiting every entity when the order is not important."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":15799,"startedAt":"2026-07-11T07:32:42.088Z","completedAt":"2026-07-11T07:32:57.889Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17851,"completionTokens":70,"totalTokens":17921,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for a radius around the player and avoids the broader visibility-driven `FindInPVS` path.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for a radius around the player and avoids the broader visibility-driven `FindInPVS` path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25464,"startedAt":"2026-07-11T07:32:43.037Z","completedAt":"2026-07-11T07:33:08.640Z","answerBytes":490,"answerChars":490,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":458,"totalTokens":18301,"reasoningTokens":313,"cachedTokens":13056},"finalResponse":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n    local nearby = {}\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: This scans only the player list and compares squared distances, avoiding allocation and filtering of every entity found in the sphere.","model_patch":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n    local nearby = {}\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: This scans only the player list and compares squared distances, avoiding allocation and filtering of every entity found in the sphere."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19465,"startedAt":"2026-07-11T07:32:43.110Z","completedAt":"2026-07-11T07:33:02.790Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":77,"totalTokens":17915,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: A numeric `for` loop is generally faster and clearer in Garry's Mod Lua because its counter, limit, and increment are handled by the VM without repeated Lua-level condition and increment work.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: A numeric `for` loop is generally faster and clearer in Garry's Mod Lua because its counter, limit, and increment are handled by the VM without repeated Lua-level condition and increment work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":12913,"startedAt":"2026-07-11T07:32:43.437Z","completedAt":"2026-07-11T07:32:56.354Z","answerBytes":798,"answerChars":798,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":224,"totalTokens":18070,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Faster: one hook dispatch, all players passed as data.\nlocal playerGetAll = player.GetAll\n\nhook.Add(\"Think\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", playerGetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandleAllPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom per-player logic here.\n    end\nend)\n\n-- Slower: repeats hook lookup and dispatch once per player.\nhook.Add(\"Think\", \"NotifyCustomLogicPerPlayer\", function()\n    local players = playerGetAll()\n    for i = 1, #players do\n        hook.Run(\"CustomPlayerTick\", players[i])\n    end\nend)\n```\nReason: Dispatching one hook avoids repeating Garry's Mod hook-table lookup and callback traversal for every player; iterate the players inside one handler instead.","model_patch":"```lua\n-- Faster: one hook dispatch, all players passed as data.\nlocal playerGetAll = player.GetAll\n\nhook.Add(\"Think\", \"NotifyCustomLogic\", function()\n    hook.Run(\"CustomPlayerTick\", playerGetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandleAllPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom per-player logic here.\n    end\nend)\n\n-- Slower: repeats hook lookup and dispatch once per player.\nhook.Add(\"Think\", \"NotifyCustomLogicPerPlayer\", function()\n    local players = playerGetAll()\n    for i = 1, #players do\n        hook.Run(\"CustomPlayerTick\", players[i])\n    end\nend)\n```\nReason: Dispatching one hook avoids repeating Garry's Mod hook-table lookup and callback traversal for every player; iterate the players inside one handler instead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11943,"startedAt":"2026-07-11T07:32:43.437Z","completedAt":"2026-07-11T07:32:55.428Z","answerBytes":357,"answerChars":357,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":120,"totalTokens":17961,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaLarge\", 20, 20)\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 55)\n    surface.DrawText(health)\nend)\n```\nReason: Cache the player health once per HUDPaint frame and reuse it, avoiding two repeated Lua-to-engine calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaLarge\", 20, 20)\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 55)\n    surface.DrawText(health)\nend)\n```\nReason: Cache the player health once per HUDPaint frame and reuse it, avoiding two repeated Lua-to-engine calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11255,"startedAt":"2026-07-11T07:32:43.439Z","completedAt":"2026-07-11T07:32:55.020Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":87,"totalTokens":17920,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one shared color avoids allocating a new Color table on every paint-loop iteration.","model_patch":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one shared color avoids allocating a new Color table on every paint-loop iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18325,"startedAt":"2026-07-11T07:32:43.439Z","completedAt":"2026-07-11T07:33:02.259Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":71,"totalTokens":17902,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table-field lookups in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table-field lookups in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17967,"startedAt":"2026-07-11T07:32:44.159Z","completedAt":"2026-07-11T07:33:02.263Z","answerBytes":332,"answerChars":332,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":95,"totalTokens":17927,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"Example\", function()\n    local player = LocalPlayer()\n    if not IsValid(player) then return end\n\n    -- Use player here.\nend)\n```\nReason: Caching the global function in a local avoids repeated global-table lookups while still fetching the current local player when needed.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"Example\", function()\n    local player = LocalPlayer()\n    if not IsValid(player) then return end\n\n    -- Use player here.\nend)\n```\nReason: Caching the global function in a local avoids repeated global-table lookups while still fetching the current local player when needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":20482,"startedAt":"2026-07-11T07:32:45.527Z","completedAt":"2026-07-11T07:33:06.185Z","answerBytes":513,"answerChars":513,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":153,"totalTokens":17999,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- `a` and `b` are valid player entities.\n-- Dot products avoid math.acos: with normalized aim vectors, dot = cos(theta).\nlocal function AreRoughlyLookingAtEachOther(a, b)\n    local aAim = a:GetAimVector()\n    local bAim = b:GetAimVector()\n\n    -- 0.7 is roughly within 45 degrees of directly facing each other.\n    return aAim:Dot(-bAim) >= 0.7\nend\n```\nReason: Aim vectors are normalized, so their dot product directly measures directional alignment without the expensive inverse-cosine angle calculation.","model_patch":"```lua\n-- `a` and `b` are valid player entities.\n-- Dot products avoid math.acos: with normalized aim vectors, dot = cos(theta).\nlocal function AreRoughlyLookingAtEachOther(a, b)\n    local aAim = a:GetAimVector()\n    local bAim = b:GetAimVector()\n\n    -- 0.7 is roughly within 45 degrees of directly facing each other.\n    return aAim:Dot(-bAim) >= 0.7\nend\n```\nReason: Aim vectors are normalized, so their dot product directly measures directional alignment without the expensive inverse-cosine angle calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21139,"startedAt":"2026-07-11T07:32:46.009Z","completedAt":"2026-07-11T07:33:07.188Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":127,"totalTokens":17969,"reasoningTokens":68,"cachedTokens":13056},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A controlled helper called directly avoids Garry's Mod entity metatable method lookup; localize `SomeHelper` for the fastest hot-path form.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A controlled helper called directly avoids Garry's Mod entity metatable method lookup; localize `SomeHelper` for the fastest hot-path form."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19507,"startedAt":"2026-07-11T07:32:47.253Z","completedAt":"2026-07-11T07:33:06.993Z","answerBytes":119,"answerChars":119,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":45,"totalTokens":17878,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes directly to the console and avoids print's extra formatting overhead.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes directly to the console and avoids print's extra formatting overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16690,"startedAt":"2026-07-11T07:32:47.787Z","completedAt":"2026-07-11T07:33:04.523Z","answerBytes":240,"answerChars":240,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":81,"totalTokens":17920,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use i and value\nend\n```\nReason: A numeric `for` over a sequential array avoids the iterator-function overhead of `pairs` and `ipairs`; `pairs` also makes no ordering guarantee.","model_patch":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- use i and value\nend\n```\nReason: A numeric `for` over a sequential array avoids the iterator-function overhead of `pairs` and `ipairs`; `pairs` also makes no ordering guarantee."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16148,"startedAt":"2026-07-11T07:32:47.930Z","completedAt":"2026-07-11T07:33:04.182Z","answerBytes":570,"answerChars":570,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":276,"totalTokens":18125,"reasoningTokens":112,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster than fn.Map(fn.Filter(players, predicate), mapper): one pass, no intermediate table.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A numeric single-pass loop avoids fn combinator calls, closure overhead, and the intermediate filtered table.","model_patch":"```lua\n-- Faster than fn.Map(fn.Filter(players, predicate), mapper): one pass, no intermediate table.\nlocal function activePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = activePlayerNames(player.GetAll())\n```\nReason: A numeric single-pass loop avoids fn combinator calls, closure overhead, and the intermediate filtered table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15895,"startedAt":"2026-07-11T07:32:53.033Z","completedAt":"2026-07-11T07:33:08.971Z","answerBytes":597,"answerChars":597,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17848,"completionTokens":169,"totalTokens":18017,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal players = {}\n\nlocal function refreshPlayers()\n    players = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"CachePlayers\", refreshPlayers)\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers\", refreshPlayers)\nhook.Add(\"PlayerDisconnected\", \"CachePlayers\", refreshPlayers)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #players do\n        local ply = players[i]\n        -- per-player tick work\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only on join/leave events, so the per-tick hook iterates the cached array without rebuilding it every tick.","model_patch":"```lua\nlocal players = {}\n\nlocal function refreshPlayers()\n    players = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"CachePlayers\", refreshPlayers)\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers\", refreshPlayers)\nhook.Add(\"PlayerDisconnected\", \"CachePlayers\", refreshPlayers)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #players do\n        local ply = players[i]\n        -- per-player tick work\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only on join/leave events, so the per-tick hook iterates the cached array without rebuilding it every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11580,"startedAt":"2026-07-11T07:32:53.102Z","completedAt":"2026-07-11T07:33:04.704Z","answerBytes":400,"answerChars":400,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":119,"totalTokens":17954,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal PlayerState = {}\n\n-- Write once / update when needed\nPlayerState[ply] = value\n\n-- Hot-path read\nlocal value = PlayerState[ply]\n\n-- Cleanup when the player leaves\nhook.Add(\"PlayerDisconnected\", \"ClearPlayerState\", function(ply)\n    PlayerState[ply] = nil\nend)\n```\nReason: A plain table indexed by the player avoids Garry's Mod player metatable field lookup, making repeated reads cheaper.","model_patch":"```lua\nlocal PlayerState = {}\n\n-- Write once / update when needed\nPlayerState[ply] = value\n\n-- Hot-path read\nlocal value = PlayerState[ply]\n\n-- Cleanup when the player leaves\nhook.Add(\"PlayerDisconnected\", \"ClearPlayerState\", function(ply)\n    PlayerState[ply] = nil\nend)\n```\nReason: A plain table indexed by the player avoids Garry's Mod player metatable field lookup, making repeated reads cheaper."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11795,"startedAt":"2026-07-11T07:32:53.610Z","completedAt":"2026-07-11T07:33:05.477Z","answerBytes":326,"answerChars":326,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":106,"totalTokens":17944,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: sequential number-indexed array\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric keys provide LuaJIT's efficient array layout and support a tight indexed loop, unlike string-keyed hash-map lookups.","model_patch":"```lua\n-- Faster: sequential number-indexed array\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric keys provide LuaJIT's efficient array layout and support a tight indexed loop, unlike string-keyed hash-map lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10229,"startedAt":"2026-07-11T07:32:53.805Z","completedAt":"2026-07-11T07:33:04.109Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":65,"totalTokens":17904,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Hot path: avoid allocating/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate channel numbers avoids Color-table handling on each draw call.","model_patch":"```lua\n-- Hot path: avoid allocating/passing a Color table.\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate channel numbers avoids Color-table handling on each draw call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8097,"startedAt":"2026-07-11T07:32:54.200Z","completedAt":"2026-07-11T07:33:02.413Z","answerBytes":246,"answerChars":246,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17859,"completionTokens":70,"totalTokens":17929,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips, so it is typically lower latency for a single server without cross-server synchronization.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips, so it is typically lower latency for a single server without cross-server synchronization."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14891,"startedAt":"2026-07-11T07:32:55.103Z","completedAt":"2026-07-11T07:33:10.034Z","answerBytes":712,"answerChars":712,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":215,"totalTokens":18045,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Cache by stable player identity. Refresh on join; clear on disconnect.\nlocal steamIdByPlayer = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheSteamID\", function(ply)\n    steamIdByPlayer[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIdByPlayer[ply] = nil\nend)\n\nlocal function GetCachedSteamID(ply)\n    local steamID = steamIdByPlayer[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdByPlayer[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = GetCachedSteamID(ply)\n```\nReason: Avoids repeated native method calls while retaining a safe cache miss path and releasing disconnected player references.","model_patch":"```lua\n-- Cache by stable player identity. Refresh on join; clear on disconnect.\nlocal steamIdByPlayer = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheSteamID\", function(ply)\n    steamIdByPlayer[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIdByPlayer[ply] = nil\nend)\n\nlocal function GetCachedSteamID(ply)\n    local steamID = steamIdByPlayer[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdByPlayer[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = GetCachedSteamID(ply)\n```\nReason: Avoids repeated native method calls while retaining a safe cache miss path and releasing disconnected player references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":13028,"startedAt":"2026-07-11T07:32:55.447Z","completedAt":"2026-07-11T07:33:08.590Z","answerBytes":473,"answerChars":473,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":141,"totalTokens":17972,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\" .. i\nend\n\n-- Fast: concatenate once after collecting all pieces.\nlocal result = table.concat(pieces)\n\n-- Slow: repeated concatenation repeatedly copies the growing string.\n-- local result = \"\"\n-- for i = 1, #pieces do\n--     result = result .. pieces[i]\n-- end\n```\nReason: `table.concat` builds the final string in one native operation, avoiding repeated allocations and copies of an ever-growing string.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\" .. i\nend\n\n-- Fast: concatenate once after collecting all pieces.\nlocal result = table.concat(pieces)\n\n-- Slow: repeated concatenation repeatedly copies the growing string.\n-- local result = \"\"\n-- for i = 1, #pieces do\n--     result = result .. pieces[i]\n-- end\n```\nReason: `table.concat` builds the final string in one native operation, avoiding repeated allocations and copies of an ever-growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4854,"startedAt":"2026-07-11T07:32:55.568Z","completedAt":"2026-07-11T07:33:00.424Z","answerBytes":157,"answerChars":155,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":55,"totalTokens":17892,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: It draws the rectangle directly and avoids draw.RoundedBox’s extra wrapper work when no rounding is needed.","model_patch":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: It draws the rectangle directly and avoids draw.RoundedBox’s extra wrapper work when no rounding is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":42278,"startedAt":"2026-07-11T07:32:55.960Z","completedAt":"2026-07-11T07:33:38.293Z","answerBytes":329,"answerChars":329,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":189,"totalTokens":18025,"reasoningTokens":81,"cachedTokens":13056},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: `surface.DrawText` is the leanest of these options for unoutlined single-line text; `draw.DrawText` and `draw.SimpleTextOutlined` add wrapper work, and outlining requires extra draw passes.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: `surface.DrawText` is the leanest of these options for unoutlined single-line text; `draw.DrawText` and `draw.SimpleTextOutlined` add wrapper work, and outlining requires extra draw passes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6993,"startedAt":"2026-07-11T07:32:56.581Z","completedAt":"2026-07-11T07:33:03.718Z","answerBytes":118,"answerChars":118,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":46,"totalTokens":17874,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: `#` is the idiomatic Lua length operator for a sequential array-like table.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: `#` is the idiomatic Lua length operator for a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12060,"startedAt":"2026-07-11T07:32:56.724Z","completedAt":"2026-07-11T07:33:09.035Z","answerBytes":271,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":74,"totalTokens":17907,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster when you can replace the reference:\nt = {}\n```\nReason: Rebinding creates a new empty table in constant time, while table.Empty(t) must iterate through and clear each existing entry; use table.Empty only when other code must keep the same table reference.","model_patch":"```lua\n-- Faster when you can replace the reference:\nt = {}\n```\nReason: Rebinding creates a new empty table in constant time, while table.Empty(t) must iterate through and clear each existing entry; use table.Empty only when other code must keep the same table reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16985,"startedAt":"2026-07-11T07:32:56.893Z","completedAt":"2026-07-11T07:33:13.968Z","answerBytes":395,"answerChars":395,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":138,"totalTokens":17971,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Slow: scans every element in the list (O(n))\nif table.HasValue({ \"admin\", \"moderator\", \"user\" }, role) then\n    -- found\nend\n\n-- Fast: use a lookup set (average O(1))\nlocal allowedRoles = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif allowedRoles[role] then\n    -- found\nend\n```\nReason: A keyed lookup avoids the linear scan that `table.HasValue` performs on a list.","model_patch":"```lua\n-- Slow: scans every element in the list (O(n))\nif table.HasValue({ \"admin\", \"moderator\", \"user\" }, role) then\n    -- found\nend\n\n-- Fast: use a lookup set (average O(1))\nlocal allowedRoles = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif allowedRoles[role] then\n    -- found\nend\n```\nReason: A keyed lookup avoids the linear scan that `table.HasValue` performs on a list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14132,"startedAt":"2026-07-11T07:32:57.076Z","completedAt":"2026-07-11T07:33:11.242Z","answerBytes":396,"answerChars":396,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":123,"totalTokens":17957,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster for a small table with known fields:\nlocal playerData = {\n    name = \"Alyx\",\n    health = 100,\n    alive = true,\n}\n\n-- Rather than:\n-- local playerData = {}\n-- playerData.name = \"Alyx\"\n-- playerData.health = 100\n-- playerData.alive = true\n```\nReason: The table constructor creates and initializes the known fields in one expression, avoiding separate field-assignment statements.","model_patch":"```lua\n-- Faster for a small table with known fields:\nlocal playerData = {\n    name = \"Alyx\",\n    health = 100,\n    alive = true,\n}\n\n-- Rather than:\n-- local playerData = {}\n-- playerData.name = \"Alyx\"\n-- playerData.health = 100\n-- playerData.alive = true\n```\nReason: The table constructor creates and initializes the known fields in one expression, avoiding separate field-assignment statements."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9195,"startedAt":"2026-07-11T07:32:57.255Z","completedAt":"2026-07-11T07:33:06.456Z","answerBytes":154,"answerChars":154,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":52,"totalTokens":17882,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal value = tbl[math.random(#tbl)]\n```\nReason: A sequential table has dense numeric indices, so direct indexing avoids table.Random's extra work.","model_patch":"```lua\nlocal value = tbl[math.random(#tbl)]\n```\nReason: A sequential table has dense numeric indices, so direct indexing avoids table.Random's extra work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13104,"startedAt":"2026-07-11T07:32:57.408Z","completedAt":"2026-07-11T07:33:10.669Z","answerBytes":149,"answerChars":149,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":52,"totalTokens":17881,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids the extra function-call and exponentiation overhead of `x ^ 2` in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids the extra function-call and exponentiation overhead of `x ^ 2` in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-terra@high","model_name_or_path":"gpt-5.6-terra@high","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":12937,"startedAt":"2026-07-11T07:32:57.965Z","completedAt":"2026-07-11T07:33:11.076Z","answerBytes":179,"answerChars":179,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":58,"totalTokens":17901,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players without allocating the table returned by `player.GetAll()`.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players without allocating the table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8336,"startedAt":"2026-07-11T07:32:58.255Z","completedAt":"2026-07-11T07:33:06.756Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":214,"totalTokens":18052,"reasoningTokens":138,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Use ent here.\n    end\nend\n```\nReason: ents.Iterator() traverses entities directly, avoiding the table allocation from ents.GetAll().","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Use ent here.\n    end\nend\n```\nReason: ents.Iterator() traverses entities directly, avoiding the table allocation from ents.GetAll()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":8222,"startedAt":"2026-07-11T07:32:58.373Z","completedAt":"2026-07-11T07:33:06.851Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17842,"completionTokens":69,"totalTokens":17911,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback on Garry's Mod's `Think` hook, using `MyAddon.Think` as its unique identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback on Garry's Mod's `Think` hook, using `MyAddon.Think` as its unique identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":12203,"startedAt":"2026-07-11T07:32:59.380Z","completedAt":"2026-07-11T07:33:11.585Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":65,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` returns false for `nil`, invalid entity handles, and entities that have been removed, so guard method calls with it.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove()\nend\n```\nReason: `IsValid` returns false for `nil`, invalid entity handles, and entities that have been removed, so guard method calls with it."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9190,"startedAt":"2026-07-11T07:32:59.952Z","completedAt":"2026-07-11T07:33:09.261Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":71,"totalTokens":17897,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server-side handler for incoming messages sent with `net.Start(\"MyAddon.Sync\")`.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server-side handler for incoming messages sent with `net.Start(\"MyAddon.Sync\")`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":30884,"startedAt":"2026-07-11T07:33:00.431Z","completedAt":"2026-07-11T07:33:31.317Z","answerBytes":194,"answerChars":194,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":535,"totalTokens":18371,"reasoningTokens":468,"cachedTokens":0},"finalResponse":"```lua\nlocal ang = angle_zero -- treat as immutable; do not modify it\n```\nReason: `angle_zero` reuses Garry's Mod's shared zero Angle and avoids allocating a new `Angle()` on each hot-path call.","model_patch":"```lua\nlocal ang = angle_zero -- treat as immutable; do not modify it\n```\nReason: `angle_zero` reuses Garry's Mod's shared zero Angle and avoids allocating a new `Angle()` on each hot-path call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9989,"startedAt":"2026-07-11T07:33:01.685Z","completedAt":"2026-07-11T07:33:11.808Z","answerBytes":191,"answerChars":191,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":154,"totalTokens":17995,"reasoningTokens":86,"cachedTokens":0},"finalResponse":"```lua\nlocal myaddonColor = Color(255, 255, 255)\nlocal color = myaddonColor\n```\nReason: A local variable avoids global-name and table-field lookups, so it is the fastest frequent-read option.","model_patch":"```lua\nlocal myaddonColor = Color(255, 255, 255)\nlocal color = myaddonColor\n```\nReason: A local variable avoids global-name and table-field lookups, so it is the fastest frequent-read option."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11121,"startedAt":"2026-07-11T07:33:01.704Z","completedAt":"2026-07-11T07:33:12.943Z","answerBytes":338,"answerChars":336,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":110,"totalTokens":17945,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Preferred: DarkRP's job API\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job names:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` reads DarkRP’s job state through its supported API; `GetNWString` depends on legacy networked-variable storage and is not the correct DarkRP contract.","model_patch":"```lua\n-- Preferred: DarkRP's job API\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job names:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` reads DarkRP’s job state through its supported API; `GetNWString` depends on legacy networked-variable storage and is not the correct DarkRP contract."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9128,"startedAt":"2026-07-11T07:33:02.000Z","completedAt":"2026-07-11T07:33:11.335Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":101,"totalTokens":17935,"reasoningTokens":33,"cachedTokens":13056},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= 256 * 256 then\n    -- Within 256 units\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= 256 * 256 then\n    -- Within 256 units\nend\n```\nReason: `DistToSqr` avoids the square-root calculation required for actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12663,"startedAt":"2026-07-11T07:33:02.311Z","completedAt":"2026-07-11T07:33:15.060Z","answerBytes":157,"answerChars":157,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":157,"totalTokens":17987,"reasoningTokens":102,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Use ent\nend\n```\nReason: ents.Iterator() visits entities without allocating the table created by ents.GetAll().","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Use ent\nend\n```\nReason: ents.Iterator() visits entities without allocating the table created by ents.GetAll()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":11066,"startedAt":"2026-07-11T07:33:02.325Z","completedAt":"2026-07-11T07:33:13.480Z","answerBytes":173,"answerChars":173,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17851,"completionTokens":155,"totalTokens":18006,"reasoningTokens":95,"cachedTokens":0},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` uses the engine's spatial partition for a cheap radius query around the player.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(player:GetPos(), 256)\n```\nReason: `ents.FindInSphere` uses the engine's spatial partition for a cheap radius query around the player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13921,"startedAt":"2026-07-11T07:33:02.529Z","completedAt":"2026-07-11T07:33:16.552Z","answerBytes":329,"answerChars":329,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17847,"completionTokens":397,"totalTokens":18244,"reasoningTokens":293,"cachedTokens":13056},"finalResponse":"```lua\nlocal radiusSqr = radius * radius\nlocal nearby = {}\n\nfor _, ply in player.Iterator() do\n    if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n        nearby[#nearby + 1] = ply\n    end\nend\n\nreturn nearby\n```\nReason: Iterating only players avoids collecting unrelated entities, and squared-distance checks avoid square roots.","model_patch":"```lua\nlocal radiusSqr = radius * radius\nlocal nearby = {}\n\nfor _, ply in player.Iterator() do\n    if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n        nearby[#nearby + 1] = ply\n    end\nend\n\nreturn nearby\n```\nReason: Iterating only players avoids collecting unrelated entities, and squared-distance checks avoid square roots."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12450,"startedAt":"2026-07-11T07:33:02.824Z","completedAt":"2026-07-11T07:33:15.389Z","answerBytes":190,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17840,"completionTokens":140,"totalTokens":17980,"reasoningTokens":73,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` loops are generally faster in Garry's Mod Lua because iteration control is handled by Lua’s specialized loop bytecode.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` loops are generally faster in Garry's Mod Lua because iteration control is handled by Lua’s specialized loop bytecode."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11824,"startedAt":"2026-07-11T07:33:03.881Z","completedAt":"2026-07-11T07:33:15.906Z","answerBytes":337,"answerChars":337,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17848,"completionTokens":224,"totalTokens":18072,"reasoningTokens":120,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: one hook dispatch, with the player list as one argument.\nhook.Run(\"MyTickPlayers\", player.GetAll())\n\n-- Slower: one hook dispatch per player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: One hook.Run call avoids repeating hook lookup and listener dispatch for every player.","model_patch":"```lua\n-- Faster: one hook dispatch, with the player list as one argument.\nhook.Run(\"MyTickPlayers\", player.GetAll())\n\n-- Slower: one hook dispatch per player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"MyTickPlayer\", ply)\nend\n```\nReason: One hook.Run call avoids repeating hook lookup and listener dispatch for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14273,"startedAt":"2026-07-11T07:33:04.110Z","completedAt":"2026-07-11T07:33:18.385Z","answerBytes":311,"answerChars":311,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":357,"totalTokens":18200,"reasoningTokens":245,"cachedTokens":13056},"finalResponse":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"HUD\", 20, 20, color_white)\ndraw.SimpleText(health, \"HUD\", 20, 45, color_white)\ndraw.SimpleText(health, \"HUD\", 20, 70, color_white)\n```\nReason: Reads the player's health once per HUDPaint frame and reuses the local value for all three draws.","model_patch":"```lua\nlocal health = LocalPlayer():Health()\n\ndraw.SimpleText(health, \"HUD\", 20, 20, color_white)\ndraw.SimpleText(health, \"HUD\", 20, 45, color_white)\ndraw.SimpleText(health, \"HUD\", 20, 70, color_white)\n```\nReason: Reads the player's health once per HUDPaint frame and reuses the local value for all three draws."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9161,"startedAt":"2026-07-11T07:33:04.302Z","completedAt":"2026-07-11T07:33:13.574Z","answerBytes":236,"answerChars":236,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":84,"totalTokens":17917,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one color avoids allocating a new Color object on every iteration.","model_patch":"```lua\nlocal WHITE = color_white -- or: local WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Reusing one color avoids allocating a new Color object on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5304,"startedAt":"2026-07-11T07:33:04.525Z","completedAt":"2026-07-11T07:33:09.830Z","answerBytes":167,"answerChars":167,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":69,"totalTokens":17900,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14240,"startedAt":"2026-07-11T07:33:04.770Z","completedAt":"2026-07-11T07:33:19.101Z","answerBytes":359,"answerChars":359,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":351,"totalTokens":18187,"reasoningTokens":245,"cachedTokens":13056},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\n-- Hot path: reuse the cached entity.\nif IsValid(localPlayer) then\n    local position = localPlayer:GetPos()\nend\n```\nReason: Cache the LocalPlayer entity once after client entities initialize, then reuse the local reference in hot paths.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\n-- Hot path: reuse the cached entity.\nif IsValid(localPlayer) then\n    local position = localPlayer:GetPos()\nend\n```\nReason: Cache the LocalPlayer entity once after client entities initialize, then reuse the local reference in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":8866,"startedAt":"2026-07-11T07:33:05.581Z","completedAt":"2026-07-11T07:33:14.512Z","answerBytes":329,"answerChars":329,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17850,"completionTokens":273,"totalTokens":18123,"reasoningTokens":174,"cachedTokens":0},"finalResponse":"```lua\nlocal function RoughlyLookingAtEachOther(playerA, playerB)\n    return IsValid(playerA)\n        and IsValid(playerB)\n        and playerA:GetAimVector():Dot(playerB:GetAimVector()) <= -0.7\nend\n```\nReason: The dot product directly measures opposing normalized aim vectors, avoiding the expensive `math.acos` angle conversion.","model_patch":"```lua\nlocal function RoughlyLookingAtEachOther(playerA, playerB)\n    return IsValid(playerA)\n        and IsValid(playerB)\n        and playerA:GetAimVector():Dot(playerB:GetAimVector()) <= -0.7\nend\n```\nReason: The dot product directly measures opposing normalized aim vectors, avoiding the expensive `math.acos` angle conversion."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14630,"startedAt":"2026-07-11T07:33:06.452Z","completedAt":"2026-07-11T07:33:21.299Z","answerBytes":139,"answerChars":139,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17840,"completionTokens":123,"totalTokens":17963,"reasoningTokens":71,"cachedTokens":13056},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A direct helper call avoids the per-call table/metatable method lookup that `ply:SomeHelper()` performs.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A direct helper call avoids the per-call table/metatable method lookup that `ply:SomeHelper()` performs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17337,"startedAt":"2026-07-11T07:33:06.579Z","completedAt":"2026-07-11T07:33:24.113Z","answerBytes":125,"answerChars":123,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":169,"totalTokens":18004,"reasoningTokens":117,"cachedTokens":13056},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console and avoids `print`’s extra formatting overhead.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console and avoids `print`’s extra formatting overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10928,"startedAt":"2026-07-11T07:33:06.848Z","completedAt":"2026-07-11T07:33:17.822Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":78,"totalTokens":17919,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use i and value\nend\n```\nReason: A numeric `for` avoids the iterator-function overhead of `pairs`/`ipairs` and is typically fastest for a dense sequential array.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use i and value\nend\n```\nReason: A numeric `for` avoids the iterator-function overhead of `pairs`/`ipairs` and is typically fastest for a dense sequential array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":29202,"startedAt":"2026-07-11T07:33:06.892Z","completedAt":"2026-07-11T07:33:36.102Z","answerBytes":466,"answerChars":466,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17851,"completionTokens":553,"totalTokens":18404,"reasoningTokens":414,"cachedTokens":13056},"finalResponse":"```lua\nlocal function alivePlayerNames(players)\n    local names, count = {}, 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = alivePlayerNames(player.GetAll())\n```\nReason: One indexed loop fuses filtering and mapping, avoiding fn combinator dispatch and intermediate table allocation.","model_patch":"```lua\nlocal function alivePlayerNames(players)\n    local names, count = {}, 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = alivePlayerNames(player.GetAll())\n```\nReason: One indexed loop fuses filtering and mapping, avoiding fn combinator dispatch and intermediate table allocation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20693,"startedAt":"2026-07-11T07:33:06.994Z","completedAt":"2026-07-11T07:33:27.690Z","answerBytes":733,"answerChars":733,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17852,"completionTokens":428,"totalTokens":18280,"reasoningTokens":218,"cachedTokens":13056},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers.Add\", function(ply)\n    cachedPlayers[#cachedPlayers + 1] = ply\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CachePlayers.Remove\", function(ply)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == ply then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: `player.GetAll()` runs once at load and the cache changes only on join/disconnect, avoiding a fresh table allocation and lookup every tick.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers.Add\", function(ply)\n    cachedPlayers[#cachedPlayers + 1] = ply\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CachePlayers.Remove\", function(ply)\n    for index = #cachedPlayers, 1, -1 do\n        if cachedPlayers[index] == ply then\n            table.remove(cachedPlayers, index)\n            break\n        end\n    end\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for index = 1, #cachedPlayers do\n        local ply = cachedPlayers[index]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: `player.GetAll()` runs once at load and the cache changes only on join/disconnect, avoiding a fresh table allocation and lookup every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17435,"startedAt":"2026-07-11T07:33:07.273Z","completedAt":"2026-07-11T07:33:24.784Z","answerBytes":274,"answerChars":274,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":485,"totalTokens":18320,"reasoningTokens":399,"cachedTokens":13056},"finalResponse":"```lua\nlocal temporary = setmetatable({}, { __mode = \"k\" })\n\ntemporary[ply] = value\nlocal value = temporary[ply]\n```\nReason: A direct Lua table lookup avoids the Player entity's metamethod-backed field access; weak keys also release data when the player entity is collected.","model_patch":"```lua\nlocal temporary = setmetatable({}, { __mode = \"k\" })\n\ntemporary[ply] = value\nlocal value = temporary[ply]\n```\nReason: A direct Lua table lookup avoids the Player entity's metamethod-backed field access; weak keys also release data when the player entity is collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13331,"startedAt":"2026-07-11T07:33:08.592Z","completedAt":"2026-07-11T07:33:21.925Z","answerBytes":287,"answerChars":285,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":243,"totalTokens":18081,"reasoningTokens":144,"cachedTokens":13056},"finalResponse":"```lua\nlocal values = {\n    \"alpha\",\n    \"bravo\",\n    \"charlie\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric keys use Lua’s array part and fast indexed traversal; string-keyed maps require hash lookups and generic iteration.","model_patch":"```lua\nlocal values = {\n    \"alpha\",\n    \"bravo\",\n    \"charlie\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric keys use Lua’s array part and fast indexed traversal; string-keyed maps require hash lookups and generic iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":28493,"startedAt":"2026-07-11T07:33:08.642Z","completedAt":"2026-07-11T07:33:37.138Z","answerBytes":142,"answerChars":142,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":268,"totalTokens":18109,"reasoningTokens":213,"cachedTokens":13056},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Separate numeric arguments avoid Color object/table handling on the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Separate numeric arguments avoid Color object/table handling on the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15316,"startedAt":"2026-07-11T07:33:09.034Z","completedAt":"2026-07-11T07:33:24.448Z","answerBytes":211,"answerChars":211,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17859,"completionTokens":189,"totalTokens":18048,"reasoningTokens":121,"cachedTokens":13056},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT coins FROM players WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids remote network round trips, so it is typically lower latency on a single server.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT coins FROM players WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids remote network round trips, so it is typically lower latency on a single server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16988,"startedAt":"2026-07-11T07:33:09.123Z","completedAt":"2026-07-11T07:33:26.128Z","answerBytes":411,"answerChars":411,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":423,"totalTokens":18257,"reasoningTokens":293,"cachedTokens":13056},"finalResponse":"```lua\nlocal function CachedSteamID(ply)\n    local steamID = ply.__cachedSteamID\n    if steamID == nil then\n        steamID = ply:SteamID()\n        ply.__cachedSteamID = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is stable for a connected player, so subsequent calls use a cheap Lua field read instead of repeatedly invoking `ply:SteamID()`.","model_patch":"```lua\nlocal function CachedSteamID(ply)\n    local steamID = ply.__cachedSteamID\n    if steamID == nil then\n        steamID = ply:SteamID()\n        ply.__cachedSteamID = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is stable for a connected player, so subsequent calls use a cheap Lua field read instead of repeatedly invoking `ply:SteamID()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":9476,"startedAt":"2026-07-11T07:33:09.370Z","completedAt":"2026-07-11T07:33:18.965Z","answerBytes":283,"answerChars":283,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":97,"totalTokens":17932,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts, \"\\n\")\n```\nReason: `table.concat` builds the final string in one native operation, avoiding repeated allocation and copying of the growing string caused by `..` in a loop.","model_patch":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts, \"\\n\")\n```\nReason: `table.concat` builds the final string in one native operation, avoiding repeated allocation and copying of the growing string caused by `..` in a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12479,"startedAt":"2026-07-11T07:33:09.861Z","completedAt":"2026-07-11T07:33:22.385Z","answerBytes":161,"answerChars":159,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":58,"totalTokens":17897,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: It draws the rectangle directly and avoids `draw.RoundedBox`’s helper-call overhead when no rounding is needed.","model_patch":"```lua\nsurface.DrawRect(x, y, w, h)\n```\nReason: It draws the rectangle directly and avoids `draw.RoundedBox`’s helper-call overhead when no rounding is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10273,"startedAt":"2026-07-11T07:33:10.035Z","completedAt":"2026-07-11T07:33:20.311Z","answerBytes":389,"answerChars":389,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":256,"totalTokens":18094,"reasoningTokens":129,"cachedTokens":13056},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawStatus\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255)\n    surface.SetTextPos(24, 24)\n    surface.DrawText(\"Status: connected\")\nend)\n```\nReason: `surface.DrawText` draws the whole line directly and avoids the extra alignment, shadow, outline, and per-character work in `draw.DrawText` and `draw.SimpleTextOutlined`.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawStatus\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255)\n    surface.SetTextPos(24, 24)\n    surface.DrawText(\"Status: connected\")\nend)\n```\nReason: `surface.DrawText` draws the whole line directly and avoids the extra alignment, shadow, outline, and per-character work in `draw.DrawText` and `draw.SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9826,"startedAt":"2026-07-11T07:33:10.733Z","completedAt":"2026-07-11T07:33:20.619Z","answerBytes":129,"answerChars":129,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":49,"totalTokens":17879,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal count = #items\n```\nReason: `#` is the idiomatic length operator for sequential array-like tables in Garry's Mod Lua.","model_patch":"```lua\nlocal count = #items\n```\nReason: `#` is the idiomatic length operator for sequential array-like tables in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7518,"startedAt":"2026-07-11T07:33:11.097Z","completedAt":"2026-07-11T07:33:18.652Z","answerBytes":242,"answerChars":242,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":130,"totalTokens":17965,"reasoningTokens":58,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster when no other code needs to retain a reference to the old table:\nt = {}\n```\nReason: Reassignment only creates and binds a new empty table; `table.Empty(t)` must iterate through the large existing table and remove its entries.","model_patch":"```lua\n-- Faster when no other code needs to retain a reference to the old table:\nt = {}\n```\nReason: Reassignment only creates and binds a new empty table; `table.Empty(t)` must iterate through the large existing table and remove its entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10337,"startedAt":"2026-07-11T07:33:11.258Z","completedAt":"2026-07-11T07:33:21.597Z","answerBytes":438,"answerChars":438,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":149,"totalTokens":17986,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Slower: linear scan through a list\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, role) then\n    -- allowed\nend\n\n-- Faster: O(1) average-case hash lookup\nlocal allowed = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowed[role] then\n    -- allowed\nend\n```\nReason: `table.HasValue` scans the list linearly (O(n)); a set keyed by the value uses an average O(1) table lookup.","model_patch":"```lua\n-- Slower: linear scan through a list\nlocal allowedList = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(allowedList, role) then\n    -- allowed\nend\n\n-- Faster: O(1) average-case hash lookup\nlocal allowed = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif allowed[role] then\n    -- allowed\nend\n```\nReason: `table.HasValue` scans the list linearly (O(n)); a set keyed by the value uses an average O(1) table lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14589,"startedAt":"2026-07-11T07:33:11.357Z","completedAt":"2026-07-11T07:33:25.995Z","answerBytes":482,"answerChars":482,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":136,"totalTokens":17970,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster for small, known tables: initialize fields in the constructor.\nlocal playerState = {\n    health = 100,\n    armor = 0,\n    alive = true,\n}\n\n-- Slower: create an empty table, then perform separate field assignments.\nlocal playerStateSlower = {}\nplayerStateSlower.health = 100\nplayerStateSlower.armor = 0\nplayerStateSlower.alive = true\n```\nReason: A table constructor creates and initializes the known fields in one expression, avoiding separate assignment operations.","model_patch":"```lua\n-- Faster for small, known tables: initialize fields in the constructor.\nlocal playerState = {\n    health = 100,\n    armor = 0,\n    alive = true,\n}\n\n-- Slower: create an empty table, then perform separate field assignments.\nlocal playerStateSlower = {}\nplayerStateSlower.health = 100\nplayerStateSlower.armor = 0\nplayerStateSlower.alive = true\n```\nReason: A table constructor creates and initializes the known fields in one expression, avoiding separate assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7034,"startedAt":"2026-07-11T07:33:11.613Z","completedAt":"2026-07-11T07:33:18.843Z","answerBytes":160,"answerChars":160,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":56,"totalTokens":17888,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Direct indexed lookup avoids table.Random's extra work when the table is a dense 1..#items sequence.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Direct indexed lookup avoids table.Random's extra work when the table is a dense 1..#items sequence."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12863,"startedAt":"2026-07-11T07:33:11.815Z","completedAt":"2026-07-11T07:33:24.683Z","answerBytes":124,"answerChars":124,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":89,"totalTokens":17920,"reasoningTokens":44,"cachedTokens":13056},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids function-call overhead and is the idiomatic fast form.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication avoids function-call overhead and is the idiomatic fast form."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-terra@xhigh","model_name_or_path":"gpt-5.6-terra@xhigh","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":15391,"startedAt":"2026-07-11T07:33:12.944Z","completedAt":"2026-07-11T07:33:28.337Z","answerBytes":178,"answerChars":178,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":133,"totalTokens":17976,"reasoningTokens":74,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` visits connected players without allocating the table returned by `player.GetAll()`. ","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` visits connected players without allocating the table returned by `player.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18307,"startedAt":"2026-07-11T07:33:13.547Z","completedAt":"2026-07-11T07:33:32.017Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":410,"totalTokens":18244,"reasoningTokens":332,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Handle ent here.\n    end\nend\n```\nReason: `ents.Iterator()` streams entities through the loop instead of creating a table containing every map entity.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Handle ent here.\n    end\nend\n```\nReason: `ents.Iterator()` streams entities through the loop instead of creating a table containing every map entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":14780,"startedAt":"2026-07-11T07:33:13.654Z","completedAt":"2026-07-11T07:33:28.497Z","answerBytes":141,"answerChars":141,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":216,"totalTokens":18054,"reasoningTokens":155,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback to run on Garry's Mod's `Think` hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback to run on Garry's Mod's `Think` hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":21353,"startedAt":"2026-07-11T07:33:13.970Z","completedAt":"2026-07-11T07:33:35.325Z","answerBytes":181,"answerChars":181,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":165,"totalTokens":18000,"reasoningTokens":101,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` returns false for nil, invalid, or removed entities, preventing method calls on an unsafe reference.","model_patch":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` returns false for nil, invalid, or removed entities, preventing method calls on an unsafe reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24644,"startedAt":"2026-07-11T07:33:14.535Z","completedAt":"2026-07-11T07:33:39.277Z","answerBytes":190,"answerChars":190,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17824,"completionTokens":311,"totalTokens":18135,"reasoningTokens":247,"cachedTokens":13056},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for incoming messages with that exact name.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for incoming messages with that exact name."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":28454,"startedAt":"2026-07-11T07:33:15.063Z","completedAt":"2026-07-11T07:33:43.518Z","answerBytes":179,"answerChars":179,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":585,"totalTokens":18419,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal ang = angle_zero:Copy() -- fresh, mutable Angle(0, 0, 0)\n```\nReason: `angle_zero:Copy()` returns a fresh zeroed Angle while avoiding a new `Angle()` constructor call.","model_patch":"```lua\nlocal ang = angle_zero:Copy() -- fresh, mutable Angle(0, 0, 0)\n```\nReason: `angle_zero:Copy()` returns a fresh zeroed Angle while avoiding a new `Angle()` constructor call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25199,"startedAt":"2026-07-11T07:33:15.409Z","completedAt":"2026-07-11T07:33:40.702Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":265,"totalTokens":18104,"reasoningTokens":190,"cachedTokens":0},"finalResponse":"```lua\nlocal myaddonColor = Color(255, 255, 255)\nlocal color = myaddonColor\n```\nReason: A local variable is faster to read than a nested table field because it avoids table lookups; avoid globals, which are slower than locals.","model_patch":"```lua\nlocal myaddonColor = Color(255, 255, 255)\nlocal color = myaddonColor\n```\nReason: A local variable is faster to read than a nested table field because it avoids table lookups; avoid globals, which are slower than locals."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16960,"startedAt":"2026-07-11T07:33:15.907Z","completedAt":"2026-07-11T07:33:32.869Z","answerBytes":289,"answerChars":289,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":99,"totalTokens":17932,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Preferred: DarkRP's job accessor\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job data:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP stores and synchronizes job data through its DarkRPVar system, so `getDarkRPVar(\"job\")` is the supported accessor.","model_patch":"```lua\n-- Preferred: DarkRP's job accessor\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid for DarkRP job data:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP stores and synchronizes job data through its DarkRPVar system, so `getDarkRPVar(\"job\")` is the supported accessor."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":26694,"startedAt":"2026-07-11T07:33:16.595Z","completedAt":"2026-07-11T07:33:43.424Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":278,"totalTokens":18110,"reasoningTokens":209,"cachedTokens":13056},"finalResponse":"```lua\nif posA:DistToSqr(posB) <= threshold * threshold then\n    -- within threshold\nend\n```\nReason: `DistToSqr` avoids the square root required for actual distance; compare against the squared threshold.","model_patch":"```lua\nif posA:DistToSqr(posB) <= threshold * threshold then\n    -- within threshold\nend\n```\nReason: `DistToSqr` avoids the square root required for actual distance; compare against the squared threshold."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":29329,"startedAt":"2026-07-11T07:33:17.823Z","completedAt":"2026-07-11T07:33:47.154Z","answerBytes":168,"answerChars":168,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17830,"completionTokens":346,"totalTokens":18176,"reasoningTokens":287,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit ent\nend\n```\nReason: `ents.Iterator()` visits all entities without allocating the table returned by `ents.GetAll()`.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit ent\nend\n```\nReason: `ents.Iterator()` visits all entities without allocating the table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":20396,"startedAt":"2026-07-11T07:33:18.388Z","completedAt":"2026-07-11T07:33:38.805Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":341,"totalTokens":18190,"reasoningTokens":272,"cachedTokens":13056},"finalResponse":"```lua\nlocal nearbyEntities = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is an engine-backed spatial query and is commonly one of the faster general-purpose choices for entities near a player.","model_patch":"```lua\nlocal nearbyEntities = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: `ents.FindInSphere` is an engine-backed spatial query and is commonly one of the faster general-purpose choices for entities near a player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":31849,"startedAt":"2026-07-11T07:33:18.685Z","completedAt":"2026-07-11T07:33:50.565Z","answerBytes":494,"answerChars":492,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17845,"completionTokens":659,"totalTokens":18504,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local playersInRadius = {}\n\n    for _, ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            playersInRadius[#playersInRadius + 1] = ply\n        end\n    end\n\n    return playersInRadius\nend\n```\nReason: `player.Iterator()` visits only players without allocating `player.GetAll()`’s table, and squared-distance checks avoid the square root used by `Distance`.","model_patch":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local playersInRadius = {}\n\n    for _, ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            playersInRadius[#playersInRadius + 1] = ply\n        end\n    end\n\n    return playersInRadius\nend\n```\nReason: `player.Iterator()` visits only players without allocating `player.GetAll()`’s table, and squared-distance checks avoid the square root used by `Distance`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":28734,"startedAt":"2026-07-11T07:33:18.845Z","completedAt":"2026-07-11T07:33:47.580Z","answerBytes":191,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":432,"totalTokens":18266,"reasoningTokens":363,"cachedTokens":13056},"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` uses Lua’s specialized counting-loop primitive and is generally faster than a manual `while` loop in Garry’s Mod Lua.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` uses Lua’s specialized counting-loop primitive and is generally faster than a manual `while` loop in Garry’s Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16524,"startedAt":"2026-07-11T07:33:18.977Z","completedAt":"2026-07-11T07:33:35.569Z","answerBytes":406,"answerChars":406,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":115,"totalTokens":17961,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\n-- Faster: one hook dispatch, all players as an argument.\nlocal players = player.GetAll()\nhook.Run(\"MyTickPlayers\", players)\n\n-- Slower: repeats hook lookup and dispatch once per player.\n-- for _, ply in ipairs(players) do\n--     hook.Run(\"MyTickPlayer\", ply)\n-- end\n```\nReason: One hook.Run avoids repeating hook dispatch overhead for every player; listeners can loop the supplied player list once.","model_patch":"```lua\n-- Faster: one hook dispatch, all players as an argument.\nlocal players = player.GetAll()\nhook.Run(\"MyTickPlayers\", players)\n\n-- Slower: repeats hook lookup and dispatch once per player.\n-- for _, ply in ipairs(players) do\n--     hook.Run(\"MyTickPlayer\", ply)\n-- end\n```\nReason: One hook.Run avoids repeating hook dispatch overhead for every player; listeners can loop the supplied player list once."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":24976,"startedAt":"2026-07-11T07:33:19.115Z","completedAt":"2026-07-11T07:33:44.119Z","answerBytes":402,"answerChars":402,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17841,"completionTokens":653,"totalTokens":18494,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local health = tostring(LocalPlayer():Health())\n\n    draw.SimpleText(health, \"DermaLarge\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 50, color_white)\n    draw.SimpleText(health, \"DermaDefaultBold\", 20, 80, color_white)\nend)\n```\nReason: Reads health once per frame and reuses the converted value across all three draw calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local health = tostring(LocalPlayer():Health())\n\n    draw.SimpleText(health, \"DermaLarge\", 20, 20, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 20, 50, color_white)\n    draw.SimpleText(health, \"DermaDefaultBold\", 20, 80, color_white)\nend)\n```\nReason: Reads health once per frame and reuses the converted value across all three draw calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":26539,"startedAt":"2026-07-11T07:33:20.326Z","completedAt":"2026-07-11T07:33:46.926Z","answerBytes":209,"answerChars":209,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17831,"completionTokens":381,"totalTokens":18212,"reasoningTokens":302,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Creates the Color table once instead of allocating a new one on every iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, count do\n    surface.SetDrawColor(WHITE)\n    -- paint work\nend\n```\nReason: Creates the Color table once instead of allocating a new one on every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23139,"startedAt":"2026-07-11T07:33:20.626Z","completedAt":"2026-07-11T07:33:43.767Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17829,"completionTokens":209,"totalTokens":18038,"reasoningTokens":137,"cachedTokens":13056},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global and table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global and table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22302,"startedAt":"2026-07-11T07:33:21.363Z","completedAt":"2026-07-11T07:33:43.741Z","answerBytes":479,"answerChars":479,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":653,"totalTokens":18489,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\n-- Hot paths: use localPlayer instead of calling LocalPlayer().\nhook.Add(\"HUDPaint\", \"Example\", function()\n    if not IsValid(localPlayer) then return end\n    local health = localPlayer:Health()\nend)\n```\nReason: `InitPostEntity` runs once the client player entity exists, so hot paths reuse the cached entity instead of repeatedly resolving `LocalPlayer()`.","model_patch":"```lua\nlocal localPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    localPlayer = LocalPlayer()\nend)\n\n-- Hot paths: use localPlayer instead of calling LocalPlayer().\nhook.Add(\"HUDPaint\", \"Example\", function()\n    if not IsValid(localPlayer) then return end\n    local health = localPlayer:Health()\nend)\n```\nReason: `InitPostEntity` runs once the client player entity exists, so hot paths reuse the cached entity instead of repeatedly resolving `LocalPlayer()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":28502,"startedAt":"2026-07-11T07:33:21.605Z","completedAt":"2026-07-11T07:33:50.111Z","answerBytes":286,"answerChars":286,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":569,"totalTokens":18415,"reasoningTokens":481,"cachedTokens":0},"finalResponse":"```lua\nlocal function RoughlyLookingAtEachOther(a, b)\n    return a:GetAimVector():Dot(b:GetAimVector()) <= -0.5\nend\n```\nReason: Aim vectors are normalized, so their dot product is cheap to compute and becomes negative when they point roughly opposite directions; no math.acos is needed.","model_patch":"```lua\nlocal function RoughlyLookingAtEachOther(a, b)\n    return a:GetAimVector():Dot(b:GetAimVector()) <= -0.5\nend\n```\nReason: Aim vectors are normalized, so their dot product is cheap to compute and becomes negative when they point roughly opposite directions; no math.acos is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17841,"startedAt":"2026-07-11T07:33:21.936Z","completedAt":"2026-07-11T07:33:39.797Z","answerBytes":158,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17840,"completionTokens":221,"totalTokens":18061,"reasoningTokens":163,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Prefer a direct helper call; it avoids the player/metatable method lookup, while `:` only adds `ply` as the first argument.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Prefer a direct helper call; it avoids the player/metatable method lookup, while `:` only adds `ply` as the first argument."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24163,"startedAt":"2026-07-11T07:33:22.397Z","completedAt":"2026-07-11T07:33:46.576Z","answerBytes":135,"answerChars":135,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":566,"totalTokens":18401,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes a single console string with its newline, avoiding print's generic argument handling.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: MsgN writes a single console string with its newline, avoiding print's generic argument handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25299,"startedAt":"2026-07-11T07:33:24.125Z","completedAt":"2026-07-11T07:33:49.471Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17843,"completionTokens":157,"totalTokens":18000,"reasoningTokens":89,"cachedTokens":13056},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric `for` avoids iterator-function overhead and is typically fastest for a dense sequential array.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric `for` avoids iterator-function overhead and is typically fastest for a dense sequential array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":28053,"startedAt":"2026-07-11T07:33:24.470Z","completedAt":"2026-07-11T07:33:52.526Z","answerBytes":585,"answerChars":585,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17849,"completionTokens":685,"totalTokens":18534,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\n-- Equivalent result to: fn.Map(toName, fn.Filter(isEligible, players))\nlocal function eligiblePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:isCP() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = eligiblePlayerNames(player.GetAll())\n```\nReason: One indexed, fused loop preserves order while avoiding combinator calls, iterator overhead, and the intermediate filtered table.","model_patch":"```lua\n-- Equivalent result to: fn.Map(toName, fn.Filter(isEligible, players))\nlocal function eligiblePlayerNames(players)\n    local names = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:isCP() then\n            count = count + 1\n            names[count] = ply:Nick()\n        end\n    end\n\n    return names\nend\n\nlocal names = eligiblePlayerNames(player.GetAll())\n```\nReason: One indexed, fused loop preserves order while avoiding combinator calls, iterator overhead, and the intermediate filtered table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":27418,"startedAt":"2026-07-11T07:33:24.706Z","completedAt":"2026-07-11T07:33:52.127Z","answerBytes":581,"answerChars":581,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17846,"completionTokens":683,"totalTokens":18529,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", refreshPlayerCache)\n\nhook.Add(\"Tick\", \"MyAddon.ProcessPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only at startup and on join/leave events, not every tick.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", refreshPlayerCache)\n\nhook.Add(\"Tick\", \"MyAddon.ProcessPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Per-player tick work here.\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only at startup and on join/leave events, not every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":51123,"startedAt":"2026-07-11T07:33:24.928Z","completedAt":"2026-07-11T07:34:16.182Z","answerBytes":393,"answerChars":393,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":1158,"totalTokens":18993,"reasoningTokens":1034,"cachedTokens":13056},"finalResponse":"```lua\nlocal temporaryByPlayer = {}\n\ntemporaryByPlayer[ply] = value\n\n-- Hot-path read:\nlocal value = temporaryByPlayer[ply]\n\nhook.Add(\"PlayerDisconnected\", \"clear_temporary_player_data\", function(ply)\n    temporaryByPlayer[ply] = nil\nend)\n```\nReason: A plain Lua table keyed by the player avoids the Entity `__index` lookup used by `ply.someField` and makes the hot read a direct table lookup.","model_patch":"```lua\nlocal temporaryByPlayer = {}\n\ntemporaryByPlayer[ply] = value\n\n-- Hot-path read:\nlocal value = temporaryByPlayer[ply]\n\nhook.Add(\"PlayerDisconnected\", \"clear_temporary_player_data\", function(ply)\n    temporaryByPlayer[ply] = nil\nend)\n```\nReason: A plain Lua table keyed by the player avoids the Entity `__index` lookup used by `ply.someField` and makes the hot read a direct table lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14887,"startedAt":"2026-07-11T07:33:25.997Z","completedAt":"2026-07-11T07:33:40.918Z","answerBytes":254,"answerChars":252,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17838,"completionTokens":436,"totalTokens":18274,"reasoningTokens":342,"cachedTokens":0},"finalResponse":"```lua\nlocal values = {\n    \"alpha\",\n    \"bravo\",\n    \"charlie\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential integer keys use Lua’s array storage, and a numeric loop avoids string-hash map traversal.","model_patch":"```lua\nlocal values = {\n    \"alpha\",\n    \"bravo\",\n    \"charlie\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential integer keys use Lua’s array storage, and a numeric loop avoids string-hash map traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23543,"startedAt":"2026-07-11T07:33:26.146Z","completedAt":"2026-07-11T07:33:49.877Z","answerBytes":138,"answerChars":138,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":188,"totalTokens":18027,"reasoningTokens":136,"cachedTokens":13056},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing numeric channels avoids the Color table/object handling on each hot-path call.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing numeric channels avoids the Color table/object handling on each hot-path call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25346,"startedAt":"2026-07-11T07:33:27.692Z","completedAt":"2026-07-11T07:33:53.041Z","answerBytes":232,"answerChars":232,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17859,"completionTokens":321,"totalTokens":18180,"reasoningTokens":246,"cachedTokens":13056},"finalResponse":"```lua\nlocal coins = sql.QueryValue(\n    \"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID)\n)\n```\nReason: Local SQLite avoids network round trips, so it typically has lower read/write latency on a single server.","model_patch":"```lua\nlocal coins = sql.QueryValue(\n    \"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID)\n)\n```\nReason: Local SQLite avoids network round trips, so it typically has lower read/write latency on a single server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":35375,"startedAt":"2026-07-11T07:33:28.496Z","completedAt":"2026-07-11T07:34:04.049Z","answerBytes":479,"answerChars":479,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17832,"completionTokens":668,"totalTokens":18500,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIdCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is fetched from Garry's Mod once per player, then subsequent calls use a cheap Lua table lookup; weak keys avoid retaining disconnected players.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIdCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is fetched from Garry's Mod once per player, then subsequent calls use a cheap Lua table lookup; weak keys avoid retaining disconnected players."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":23525,"startedAt":"2026-07-11T07:33:28.636Z","completedAt":"2026-07-11T07:33:52.204Z","answerBytes":310,"answerChars":310,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17833,"completionTokens":207,"totalTokens":18040,"reasoningTokens":110,"cachedTokens":13056},"finalResponse":"```lua\n-- Slow: repeatedly copies the growing string.\nlocal output = \"\"\nfor i = 1, #pieces do\n    output = output .. pieces[i]\nend\n\n-- Fast: collect pieces, then concatenate once.\nlocal output = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly reallocating and copying the ever-growing string.","model_patch":"```lua\n-- Slow: repeatedly copies the growing string.\nlocal output = \"\"\nfor i = 1, #pieces do\n    output = output .. pieces[i]\nend\n\n-- Fast: collect pieces, then concatenate once.\nlocal output = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly reallocating and copying the ever-growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":26284,"startedAt":"2026-07-11T07:33:31.322Z","completedAt":"2026-07-11T07:33:57.617Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17839,"completionTokens":282,"totalTokens":18121,"reasoningTokens":215,"cachedTokens":13056},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, width, height)\n```\nReason: Direct surface calls avoid draw.RoundedBox's wrapper overhead when no rounded corners are needed.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, width, height)\n```\nReason: Direct surface calls avoid draw.RoundedBox's wrapper overhead when no rounded corners are needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":32345,"startedAt":"2026-07-11T07:33:32.027Z","completedAt":"2026-07-11T07:34:04.391Z","answerBytes":384,"answerChars":384,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17834,"completionTokens":644,"totalTokens":18478,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(\"Hello, world!\")\nend)\n```\nReason: Direct `surface.DrawText` avoids the alignment, multiline, and outline work performed by higher-level `draw.DrawText` and `draw.SimpleTextOutlined` helpers.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(\"Hello, world!\")\nend)\n```\nReason: Direct `surface.DrawText` avoids the alignment, multiline, and outline work performed by higher-level `draw.DrawText` and `draw.SimpleTextOutlined` helpers."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":26812,"startedAt":"2026-07-11T07:33:32.874Z","completedAt":"2026-07-11T07:33:59.689Z","answerBytes":115,"answerChars":115,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17826,"completionTokens":360,"totalTokens":18186,"reasoningTokens":312,"cachedTokens":13056},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: The `#` operator is the standard way to get a sequential table's length.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: The `#` operator is the standard way to get a sequential table's length."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20000,"startedAt":"2026-07-11T07:33:35.354Z","completedAt":"2026-07-11T07:33:55.500Z","answerBytes":210,"answerChars":210,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17835,"completionTokens":248,"totalTokens":18083,"reasoningTokens":179,"cachedTokens":13056},"finalResponse":"```lua\nt = {}\n```\nReason: Replacing the table is generally O(1), while `table.Empty(t)` iterates over and removes every existing entry; use `table.Empty` only when other code must keep the same table reference.","model_patch":"```lua\nt = {}\n```\nReason: Replacing the table is generally O(1), while `table.Empty(t)` iterates over and removes every existing entry; use `table.Empty` only when other code must keep the same table reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23399,"startedAt":"2026-07-11T07:33:35.571Z","completedAt":"2026-07-11T07:33:58.972Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":205,"totalTokens":18042,"reasoningTokens":119,"cachedTokens":13056},"finalResponse":"```lua\nlocal allowed = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif allowed[role] then\n    -- value exists\nend\n```\nReason: Hash-table lookup is average O(1), while `table.HasValue` scans a list in O(n).","model_patch":"```lua\nlocal allowed = {\n    admin = true,\n    moderator = true,\n    user = true,\n}\n\nif allowed[role] then\n    -- value exists\nend\n```\nReason: Hash-table lookup is average O(1), while `table.HasValue` scans a list in O(n)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":34437,"startedAt":"2026-07-11T07:33:36.110Z","completedAt":"2026-07-11T07:34:10.593Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17836,"completionTokens":588,"totalTokens":18424,"reasoningTokens":516,"cachedTokens":13056},"finalResponse":"```lua\nlocal state = {\n    health = health,\n    armor = armor,\n    alive = alive,\n}\n```\nReason: A table constructor lets LuaJIT pre-size the known fields, avoiding growth work from assigning them after `{}`.","model_patch":"```lua\nlocal state = {\n    health = health,\n    armor = armor,\n    alive = alive,\n}\n```\nReason: A table constructor lets LuaJIT pre-size the known fields, avoiding growth work from assigning them after `{}`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17392,"startedAt":"2026-07-11T07:33:37.140Z","completedAt":"2026-07-11T07:33:54.535Z","answerBytes":180,"answerChars":180,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17828,"completionTokens":54,"totalTokens":17882,"reasoningTokens":0,"cachedTokens":13056},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: A sequential table has contiguous numeric indices, so direct random indexing avoids table.Random's extra table handling.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: A sequential table has contiguous numeric indices, so direct random indexing avoids table.Random's extra table handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23738,"startedAt":"2026-07-11T07:33:38.294Z","completedAt":"2026-07-11T07:34:02.035Z","answerBytes":119,"answerChars":119,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17827,"completionTokens":116,"totalTokens":17943,"reasoningTokens":72,"cachedTokens":13056},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the fastest, allocation-free square operation in Lua.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication is the fastest, allocation-free square operation in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-terra@max","model_name_or_path":"gpt-5.6-terra@max","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":22230,"startedAt":"2026-07-11T07:33:38.813Z","completedAt":"2026-07-11T07:34:01.047Z","answerBytes":180,"answerChars":180,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":17837,"completionTokens":225,"totalTokens":18062,"reasoningTokens":165,"cachedTokens":13056},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players without allocating the table returned by `player.GetAll()`. ","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply\nend\n```\nReason: `player.Iterator()` iterates connected players without allocating the table returned by `player.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11999,"startedAt":"2026-07-11T07:33:39.282Z","completedAt":"2026-07-11T07:33:51.285Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":125,"totalTokens":16768,"reasoningTokens":61,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator(\"prop_physics\") do\n    -- Process ent here\nend\n```\nReason: `ents.Iterator` yields matching entities one at a time without first building a table of them.","model_patch":"```lua\nfor _, ent in ents.Iterator(\"prop_physics\") do\n    -- Process ent here\nend\n```\nReason: `ents.Iterator` yields matching entities one at a time without first building a table of them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":11370,"startedAt":"2026-07-11T07:33:39.804Z","completedAt":"2026-07-11T07:33:51.177Z","answerBytes":131,"answerChars":131,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":82,"totalTokens":16729,"reasoningTokens":28,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":12002,"startedAt":"2026-07-11T07:33:40.708Z","completedAt":"2026-07-11T07:33:52.712Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":101,"totalTokens":16741,"reasoningTokens":38,"cachedTokens":16128},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the entity is non-nil and has not been removed before calling methods on it.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the entity is non-nil and has not been removed before calling methods on it."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11850,"startedAt":"2026-07-11T07:33:40.932Z","completedAt":"2026-07-11T07:33:52.795Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16635,"completionTokens":102,"totalTokens":16737,"reasoningTokens":41,"cachedTokens":16128},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":11377,"startedAt":"2026-07-11T07:33:43.426Z","completedAt":"2026-07-11T07:33:54.805Z","answerBytes":306,"answerChars":306,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":98,"totalTokens":16741,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\n-- Reuse a zeroed Angle instead of allocating a new one each time.\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path:\nlocal angle = ZERO_ANGLE\n```\nReason: Reusing a shared zeroed Angle avoids repeated Angle() allocations and is faster in hot paths when the value is read-only; clone it before mutation.","model_patch":"```lua\n-- Reuse a zeroed Angle instead of allocating a new one each time.\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path:\nlocal angle = ZERO_ANGLE\n```\nReason: Reusing a shared zeroed Angle avoids repeated Angle() allocations and is faster in hot paths when the value is read-only; clone it before mutation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11822,"startedAt":"2026-07-11T07:33:43.522Z","completedAt":"2026-07-11T07:33:55.354Z","answerBytes":195,"answerChars":195,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":101,"totalTokens":16749,"reasoningTokens":37,"cachedTokens":0},"finalResponse":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A local variable avoids repeated table indexing and global-environment lookup, making frequent reads faster.","model_patch":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A local variable avoids repeated table indexing and global-environment lookup, making frequent reads faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":10939,"startedAt":"2026-07-11T07:33:43.749Z","completedAt":"2026-07-11T07:33:54.697Z","answerBytes":186,"answerChars":186,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":66,"totalTokens":16708,"reasoningTokens":0,"cachedTokens":16128},"finalResponse":"```lua\nlocal jobName = team.GetName(ply:Team())\n```\nReason: DarkRP jobs are represented by the player's team, so `team.GetName(ply:Team())` is preferred over the networked-string lookup.","model_patch":"```lua\nlocal jobName = team.GetName(ply:Team())\n```\nReason: DarkRP jobs are represented by the player's team, so `team.GetName(ply:Team())` is preferred over the networked-string lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13217,"startedAt":"2026-07-11T07:33:43.769Z","completedAt":"2026-07-11T07:33:56.988Z","answerBytes":191,"answerChars":191,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":100,"totalTokens":16743,"reasoningTokens":32,"cachedTokens":16128},"finalResponse":"```lua\nif vec1:DistToSqr(vec2) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: DistToSqr avoids the square-root cost of calculating the actual distance.","model_patch":"```lua\nif vec1:DistToSqr(vec2) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: DistToSqr avoids the square-root cost of calculating the actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14194,"startedAt":"2026-07-11T07:33:44.205Z","completedAt":"2026-07-11T07:33:58.473Z","answerBytes":166,"answerChars":166,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":102,"totalTokens":16739,"reasoningTokens":47,"cachedTokens":16128},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here\nend\n```\nReason: `ents.Iterator()` visits entities efficiently without first creating a full entity table.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here\nend\n```\nReason: `ents.Iterator()` visits entities efficiently without first creating a full entity table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12791,"startedAt":"2026-07-11T07:33:46.587Z","completedAt":"2026-07-11T07:33:59.393Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16656,"completionTokens":156,"totalTokens":16812,"reasoningTokens":86,"cachedTokens":16128},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for nearby entities and avoids the broader PVS semantics of `FindInPVS`.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for nearby entities and avoids the broader PVS semantics of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13762,"startedAt":"2026-07-11T07:33:46.928Z","completedAt":"2026-07-11T07:34:00.692Z","answerBytes":472,"answerChars":472,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":223,"totalTokens":16873,"reasoningTokens":90,"cachedTokens":16128},"finalResponse":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSquared = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if origin:DistToSqr(ply:GetPos()) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: It iterates only players and uses squared distance, avoiding ents.FindInSphere's broader entity search and the square-root cost of distance checks.","model_patch":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSquared = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if origin:DistToSqr(ply:GetPos()) <= radiusSquared then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: It iterates only players and uses squared distance, avoiding ents.FindInSphere's broader entity search and the square-root cost of distance checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12341,"startedAt":"2026-07-11T07:33:47.156Z","completedAt":"2026-07-11T07:33:59.499Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":110,"totalTokens":16755,"reasoningTokens":40,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric `for` loops are generally faster than equivalent `while` loops in Garry's Mod Lua because the interpreter optimizes their counting and control flow.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric `for` loops are generally faster than equivalent `while` loops in Garry's Mod Lua because the interpreter optimizes their counting and control flow."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13450,"startedAt":"2026-07-11T07:33:47.587Z","completedAt":"2026-07-11T07:34:01.046Z","answerBytes":387,"answerChars":387,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16655,"completionTokens":172,"totalTokens":16827,"reasoningTokens":58,"cachedTokens":16128},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, with all players as an argument.\nhook.Run(\"CustomPlayerTick\", player.GetAll())\n\n-- Slower: one hook dispatch for every player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"CustomPlayerTick\", ply)\nend\n```\nReason: One `hook.Run` call avoids repeated hook lookup and dispatch overhead; process the player list inside the hook instead.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, with all players as an argument.\nhook.Run(\"CustomPlayerTick\", player.GetAll())\n\n-- Slower: one hook dispatch for every player.\nfor _, ply in ipairs(player.GetAll()) do\n    hook.Run(\"CustomPlayerTick\", ply)\nend\n```\nReason: One `hook.Run` call avoids repeated hook lookup and dispatch overhead; process the player list inside the hook instead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10186,"startedAt":"2026-07-11T07:33:49.487Z","completedAt":"2026-07-11T07:33:59.688Z","answerBytes":424,"answerChars":424,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":173,"totalTokens":16821,"reasoningTokens":28,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"Default\", 20, 20, color_white)\n    draw.SimpleText(\"HP: \" .. health, \"Default\", 20, 40, color_white)\n    draw.SimpleText(health > 0 and \"Alive\" or \"Dead\", \"Default\", 20, 60, color_white)\nend)\n```\nReason: Cache LocalPlayer():Health() once per frame and reuse the local value for all three draw calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"Default\", 20, 20, color_white)\n    draw.SimpleText(\"HP: \" .. health, \"Default\", 20, 40, color_white)\n    draw.SimpleText(health > 0 and \"Alive\" or \"Dead\", \"Default\", 20, 60, color_white)\nend)\n```\nReason: Cache LocalPlayer():Health() once per frame and reuse the local value for all three draw calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11417,"startedAt":"2026-07-11T07:33:49.880Z","completedAt":"2026-07-11T07:34:01.300Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":135,"totalTokens":16773,"reasoningTokens":48,"cachedTokens":16128},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    surface.SetDrawColor(white)\n    -- paint using white\nend)\n```\nReason: Create the Color object once outside the paint loop instead of allocating a new one every iteration.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    surface.SetDrawColor(white)\n    -- paint using white\nend)\n```\nReason: Create the Color object once outside the paint loop instead of allocating a new one every iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6695,"startedAt":"2026-07-11T07:33:50.150Z","completedAt":"2026-07-11T07:33:56.875Z","answerBytes":171,"answerChars":171,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":99,"totalTokens":16739,"reasoningTokens":30,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8098,"startedAt":"2026-07-11T07:33:50.567Z","completedAt":"2026-07-11T07:33:58.666Z","answerBytes":463,"answerChars":463,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":134,"totalTokens":16773,"reasoningTokens":0,"cachedTokens":16128},"finalResponse":"```lua\n-- Cache the player entity once and reuse it.\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"MyClientThink\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply instead of calling LocalPlayer() repeatedly.\n        local health = ply:Health()\n    end\nend)\n```\nReason: Caching the player entity avoids repeated LocalPlayer() lookups while refreshing the cache if the entity becomes invalid.","model_patch":"```lua\n-- Cache the player entity once and reuse it.\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"MyClientThink\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply instead of calling LocalPlayer() repeatedly.\n        local health = ply:Health()\n    end\nend)\n```\nReason: Caching the player entity avoids repeated LocalPlayer() lookups while refreshing the cache if the entity becomes invalid."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":9552,"startedAt":"2026-07-11T07:33:51.324Z","completedAt":"2026-07-11T07:34:00.942Z","answerBytes":585,"answerChars":585,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":309,"totalTokens":16966,"reasoningTokens":129,"cachedTokens":16128},"finalResponse":"```lua\nlocal function RoughlyLookingAtEachOther(plyA, plyB, minDot)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    minDot = minDot or 0.7 -- smaller angle means stricter; 0.7 is roughly 45 degrees\n\n    local delta = (plyB:GetPos() - plyA:GetPos()):GetNormalized()\n    return plyA:GetAimVector():Dot(delta) >= minDot\n       and plyB:GetAimVector():Dot(-delta) >= minDot\nend\n```\nReason: Normalize the direction between players once, then compare each aim vector with the facing direction using dot products, avoiding the expensive `math.acos` angle calculation.","model_patch":"```lua\nlocal function RoughlyLookingAtEachOther(plyA, plyB, minDot)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    minDot = minDot or 0.7 -- smaller angle means stricter; 0.7 is roughly 45 degrees\n\n    local delta = (plyB:GetPos() - plyA:GetPos()):GetNormalized()\n    return plyA:GetAimVector():Dot(delta) >= minDot\n       and plyB:GetAimVector():Dot(-delta) >= minDot\nend\n```\nReason: Normalize the direction between players once, then compare each aim vector with the facing direction using dot products, avoiding the expensive `math.acos` angle calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5734,"startedAt":"2026-07-11T07:33:51.337Z","completedAt":"2026-07-11T07:33:57.141Z","answerBytes":189,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":166,"totalTokens":16815,"reasoningTokens":105,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A direct function call avoids the colon call’s method lookup and implicit `self` setup, so it is generally faster when the helper is under your control.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A direct function call avoids the colon call’s method lookup and implicit `self` setup, so it is generally faster when the helper is under your control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6686,"startedAt":"2026-07-11T07:33:52.146Z","completedAt":"2026-07-11T07:33:58.876Z","answerBytes":149,"answerChars":147,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":205,"totalTokens":16845,"reasoningTokens":146,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the Garry’s Mod console with a newline and has less Lua-side overhead than `print`.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the Garry’s Mod console with a newline and has less Lua-side overhead than `print`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5392,"startedAt":"2026-07-11T07:33:52.209Z","completedAt":"2026-07-11T07:33:57.617Z","answerBytes":256,"answerChars":256,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":128,"totalTokens":16778,"reasoningTokens":45,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- process(value)\nend\n```\nReason: Numeric `for` typically has the lowest iteration overhead for dense sequential arrays; `pairs` is for key-value traversal, and `ipairs` adds iterator overhead.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- process(value)\nend\n```\nReason: Numeric `for` typically has the lowest iteration overhead for dense sequential arrays; `pairs` is for key-value traversal, and `ipairs` adds iterator overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7653,"startedAt":"2026-07-11T07:33:52.534Z","completedAt":"2026-07-11T07:34:00.211Z","answerBytes":570,"answerChars":570,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16662,"completionTokens":236,"totalTokens":16898,"reasoningTokens":54,"cachedTokens":16128},"finalResponse":"```lua\n-- fn.filter(allowed, function(ply) return ply:Alive() end)\n--   :map(function(ply) return ply:Nick() end)\n--   :filter(function(name) return name ~= \"\" end)\n\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if allowed[ply] and ply:Alive() then\n        local name = ply:Nick()\n\n        if name ~= \"\" then\n            count = count + 1\n            names[count] = name\n        end\n    end\nend\n```\nReason: One loop fuses the filter/map/filter stages, avoiding intermediate tables, iterator passes, and per-stage closure calls.","model_patch":"```lua\n-- fn.filter(allowed, function(ply) return ply:Alive() end)\n--   :map(function(ply) return ply:Nick() end)\n--   :filter(function(name) return name ~= \"\" end)\n\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if allowed[ply] and ply:Alive() then\n        local name = ply:Nick()\n\n        if name ~= \"\" then\n            count = count + 1\n            names[count] = name\n        end\n    end\nend\n```\nReason: One loop fuses the filter/map/filter stages, avoiding intermediate tables, iterator passes, and per-stage closure calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8933,"startedAt":"2026-07-11T07:33:52.793Z","completedAt":"2026-07-11T07:34:01.797Z","answerBytes":628,"answerChars":628,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":294,"totalTokens":16951,"reasoningTokens":119,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", refreshPlayerCache)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-tick player work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only when the player list changes, so the per-tick hook iterates the cached table instead of rebuilding it every tick.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function refreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", refreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", refreshPlayerCache)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-tick player work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only when the player list changes, so the per-tick hook iterates the cached table instead of rebuilding it every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7068,"startedAt":"2026-07-11T07:33:52.854Z","completedAt":"2026-07-11T07:33:59.940Z","answerBytes":387,"answerChars":387,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16644,"completionTokens":201,"totalTokens":16845,"reasoningTokens":88,"cachedTokens":16128},"finalResponse":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function setTemporaryData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function getTemporaryData(ply)\n    return playerData[ply]\nend\n```\nReason: A direct table lookup avoids repeated entity field lookup overhead, while weak keys allow disconnected player entities and their temporary data to be garbage-collected.","model_patch":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function setTemporaryData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function getTemporaryData(ply)\n    return playerData[ply]\nend\n```\nReason: A direct table lookup avoids repeated entity field lookup overhead, while weak keys allow disconnected player entities and their temporary data to be garbage-collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":10385,"startedAt":"2026-07-11T07:33:53.145Z","completedAt":"2026-07-11T07:34:03.660Z","answerBytes":567,"answerChars":567,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":206,"totalTokens":16853,"reasoningTokens":36,"cachedTokens":16128},"finalResponse":"```lua\n-- Faster for fixed collections: sequential number-indexed array\nlocal values = { \"red\", \"green\", \"blue\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n\n-- String-keyed map: use for named lookup, not fastest sequential iteration\nlocal colors = {\n    first = \"red\",\n    second = \"green\",\n    third = \"blue\"\n}\n\nfor key, value in pairs(colors) do\nend\n```\nReason: Sequential number-indexed arrays are faster for iteration because Garry's Mod Lua stores and traverses them in the array part, while string-keyed maps use hash lookups and `pairs` traversal.","model_patch":"```lua\n-- Faster for fixed collections: sequential number-indexed array\nlocal values = { \"red\", \"green\", \"blue\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n\n-- String-keyed map: use for named lookup, not fastest sequential iteration\nlocal colors = {\n    first = \"red\",\n    second = \"green\",\n    third = \"blue\"\n}\n\nfor key, value in pairs(colors) do\nend\n```\nReason: Sequential number-indexed arrays are faster for iteration because Garry's Mod Lua stores and traverses them in the array part, while string-keyed maps use hash lookups and `pairs` traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4563,"startedAt":"2026-07-11T07:33:54.539Z","completedAt":"2026-07-11T07:33:59.104Z","answerBytes":163,"answerChars":163,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16654,"completionTokens":87,"totalTokens":16741,"reasoningTokens":28,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate channel numbers avoids constructing or looking up a Color object in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate channel numbers avoids constructing or looking up a Color object in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4984,"startedAt":"2026-07-11T07:33:54.701Z","completedAt":"2026-07-11T07:33:59.688Z","answerBytes":210,"answerChars":210,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16670,"completionTokens":115,"totalTokens":16785,"reasoningTokens":49,"cachedTokens":16128},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13484,"startedAt":"2026-07-11T07:33:54.809Z","completedAt":"2026-07-11T07:34:08.298Z","answerBytes":464,"answerChars":464,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":268,"totalTokens":16907,"reasoningTokens":118,"cachedTokens":16128},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIdCache[ply]\n\n    if not steamID then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = getSteamID(ply)\n```\nReason: Cache SteamID() results by player entity so repeated calls avoid native lookups while weak keys allow unused player entries to be garbage-collected.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function getSteamID(ply)\n    local steamID = steamIdCache[ply]\n\n    if not steamID then\n        steamID = ply:SteamID()\n        steamIdCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = getSteamID(ply)\n```\nReason: Cache SteamID() results by player entity so repeated calls avoid native lookups while weak keys allow unused player entries to be garbage-collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4258,"startedAt":"2026-07-11T07:33:55.392Z","completedAt":"2026-07-11T07:33:59.940Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":78,"totalTokens":16720,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal pieces = {}\n\nfor i = 1, thousands do\n    pieces[i] = make_piece(i)\nend\n\nlocal result = table.concat(pieces)\n```\nReason: table.concat builds the final string once, avoiding repeated intermediate string allocations caused by .. concatenation.","model_patch":"```lua\nlocal pieces = {}\n\nfor i = 1, thousands do\n    pieces[i] = make_piece(i)\nend\n\nlocal result = table.concat(pieces)\n```\nReason: table.concat builds the final string once, avoiding repeated intermediate string allocations caused by .. concatenation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5001,"startedAt":"2026-07-11T07:33:55.647Z","completedAt":"2026-07-11T07:34:00.691Z","answerBytes":185,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":109,"totalTokens":16757,"reasoningTokens":37,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` skips the rounded-box path and is slightly faster for non-rounded rectangles.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` skips the rounded-box path and is slightly faster for non-rounded rectangles."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7548,"startedAt":"2026-07-11T07:33:56.897Z","completedAt":"2026-07-11T07:34:04.517Z","answerBytes":414,"answerChars":414,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":255,"totalTokens":16896,"reasoningTokens":117,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawFastText\", function()\n    surface.SetTextPos(32, 32)\n    surface.DrawText(\"Hello, Garry's Mod!\")\nend)\n```\nReason: `surface.DrawText` avoids the per-call setup and wrapper overhead used by `draw.DrawText`, `draw.SimpleText`, and `draw.SimpleTextOutlined`; cache the font and color outside the frame callback.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawFastText\", function()\n    surface.SetTextPos(32, 32)\n    surface.DrawText(\"Hello, Garry's Mod!\")\nend)\n```\nReason: `surface.DrawText` avoids the per-call setup and wrapper overhead used by `draw.DrawText`, `draw.SimpleText`, and `draw.SimpleTextOutlined`; cache the font and color outside the frame callback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4729,"startedAt":"2026-07-11T07:33:57.030Z","completedAt":"2026-07-11T07:34:01.817Z","answerBytes":158,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16635,"completionTokens":55,"totalTokens":16690,"reasoningTokens":0,"cachedTokens":16128},"finalResponse":"```lua\nlocal length = #array\n```\nReason: The length operator (`#`) is the preferred way to get the length of a sequential array-like table in Garry's Mod Lua.","model_patch":"```lua\nlocal length = #array\n```\nReason: The length operator (`#`) is the preferred way to get the length of a sequential array-like table in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6611,"startedAt":"2026-07-11T07:33:57.143Z","completedAt":"2026-07-11T07:34:03.756Z","answerBytes":303,"answerChars":303,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":126,"totalTokens":16768,"reasoningTokens":40,"cachedTokens":16128},"finalResponse":"```lua\n-- Generally faster when no existing references to t must be preserved:\nt = {}\n\n-- table.Empty(t) clears the existing table in place and is slower for large tables.\n```\nReason: t = {} replaces the table reference in constant time, while table.Empty(t) must remove the existing entries one by one.","model_patch":"```lua\n-- Generally faster when no existing references to t must be preserved:\nt = {}\n\n-- table.Empty(t) clears the existing table in place and is slower for large tables.\n```\nReason: t = {} replaces the table reference in constant time, while table.Empty(t) must remove the existing entries one by one."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5569,"startedAt":"2026-07-11T07:33:57.631Z","completedAt":"2026-07-11T07:34:03.269Z","answerBytes":282,"answerChars":282,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":124,"totalTokens":16766,"reasoningTokens":23,"cachedTokens":0},"finalResponse":"```lua\n-- Faster: O(1) lookup in a set\nlocal allowed = {\n    crowbar = true,\n    pistol = true,\n    shotgun = true\n}\n\nif allowed[weaponClass] then\n    print(\"Allowed\")\nend\n```\nReason: A set uses direct key lookup, while table.HasValue scans the list linearly until it finds a match.","model_patch":"```lua\n-- Faster: O(1) lookup in a set\nlocal allowed = {\n    crowbar = true,\n    pistol = true,\n    shotgun = true\n}\n\nif allowed[weaponClass] then\n    print(\"Allowed\")\nend\n```\nReason: A set uses direct key lookup, while table.HasValue scans the list linearly until it finds a match."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7137,"startedAt":"2026-07-11T07:33:57.639Z","completedAt":"2026-07-11T07:34:04.889Z","answerBytes":205,"answerChars":205,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":118,"totalTokens":16761,"reasoningTokens":49,"cachedTokens":0},"finalResponse":"```lua\nlocal player = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor creates the known fields in one operation, avoiding separate assignments after allocation.","model_patch":"```lua\nlocal player = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor creates the known fields in one operation, avoiding separate assignments after allocation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5236,"startedAt":"2026-07-11T07:33:58.712Z","completedAt":"2026-07-11T07:34:04.335Z","answerBytes":160,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":99,"totalTokens":16738,"reasoningTokens":48,"cachedTokens":16128},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables support direct indexed lookup, avoiding table.Random’s key enumeration overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables support direct indexed lookup, avoiding table.Random’s key enumeration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5128,"startedAt":"2026-07-11T07:33:58.875Z","completedAt":"2026-07-11T07:34:04.253Z","answerBytes":125,"answerChars":125,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":45,"totalTokens":16683,"reasoningTokens":0,"cachedTokens":16128},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is faster and more direct than calling a power function for squaring.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is faster and more direct than calling a power function for squaring."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-luna@low","model_name_or_path":"gpt-5.6-luna@low","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":4972,"startedAt":"2026-07-11T07:33:59.042Z","completedAt":"2026-07-11T07:34:04.102Z","answerBytes":173,"answerChars":173,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16652,"completionTokens":90,"totalTokens":16742,"reasoningTokens":35,"cachedTokens":16128},"finalResponse":"```lua\nfor ply in player.Iterator() do\n    -- use ply here\nend\n```\nReason: `player.Iterator()` visits each currently connected player without creating an intermediate table.","model_patch":"```lua\nfor ply in player.Iterator() do\n    -- use ply here\nend\n```\nReason: `player.Iterator()` visits each currently connected player without creating an intermediate table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9834,"startedAt":"2026-07-11T07:33:59.097Z","completedAt":"2026-07-11T07:34:09.214Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":242,"totalTokens":16883,"reasoningTokens":181,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator(\"prop_physics\") do\n    -- Visit ent here\nend\n```\nReason: ents.Iterator iterates entities lazily without first allocating a table containing them all.","model_patch":"```lua\nfor _, ent in ents.Iterator(\"prop_physics\") do\n    -- Visit ent here\nend\n```\nReason: ents.Iterator iterates entities lazily without first allocating a table containing them all."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":5210,"startedAt":"2026-07-11T07:33:59.380Z","completedAt":"2026-07-11T07:34:04.889Z","answerBytes":131,"answerChars":131,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":92,"totalTokens":16739,"reasoningTokens":38,"cachedTokens":2816},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":5687,"startedAt":"2026-07-11T07:33:59.542Z","completedAt":"2026-07-11T07:34:05.579Z","answerBytes":161,"answerChars":161,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":128,"totalTokens":16768,"reasoningTokens":67,"cachedTokens":16128},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the reference points to a valid, non-removed entity before method calls.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the reference points to a valid, non-removed entity before method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5278,"startedAt":"2026-07-11T07:33:59.678Z","completedAt":"2026-07-11T07:34:05.213Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16631,"completionTokens":120,"totalTokens":16751,"reasoningTokens":55,"cachedTokens":16128},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server/client handler for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a server/client handler for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":12865,"startedAt":"2026-07-11T07:33:59.774Z","completedAt":"2026-07-11T07:34:12.792Z","answerBytes":197,"answerChars":197,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":533,"totalTokens":17174,"reasoningTokens":467,"cachedTokens":0},"finalResponse":"```lua\n-- Use the shared zero angle when you only read from it.\nlocal a = angle_zero\n```\nReason: `angle_zero` avoids allocating and constructing a new Angle; do not mutate it, because it is shared.","model_patch":"```lua\n-- Use the shared zero angle when you only read from it.\nlocal a = angle_zero\n```\nReason: `angle_zero` avoids allocating and constructing a new Angle; do not mutate it, because it is shared."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7685,"startedAt":"2026-07-11T07:33:59.788Z","completedAt":"2026-07-11T07:34:07.617Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":165,"totalTokens":16815,"reasoningTokens":102,"cachedTokens":0},"finalResponse":"```lua\nlocal configColor = Color(255, 255, 255)\nlocal currentColor = configColor\n```\nReason: A local variable avoids repeated table lookups and is faster than nested or global access.","model_patch":"```lua\nlocal configColor = Color(255, 255, 255)\nlocal currentColor = configColor\n```\nReason: A local variable avoids repeated table lookups and is faster than nested or global access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6437,"startedAt":"2026-07-11T07:33:59.802Z","completedAt":"2026-07-11T07:34:06.378Z","answerBytes":249,"answerChars":249,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":173,"totalTokens":16815,"reasoningTokens":90,"cachedTokens":16128},"finalResponse":"```lua\nlocal job = ply:getDarkRPVar(\"job\")\n-- Avoid: ply:GetNWString(\"job\")\n```\nReason: DarkRP's `getDarkRPVar(\"job\")` is the framework-owned API for the player's current job and avoids relying on a replicated networked-string implementation detail.","model_patch":"```lua\nlocal job = ply:getDarkRPVar(\"job\")\n-- Avoid: ply:GetNWString(\"job\")\n```\nReason: DarkRP's `getDarkRPVar(\"job\")` is the framework-owned API for the player's current job and avoids relying on a replicated networked-string implementation detail."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5064,"startedAt":"2026-07-11T07:33:59.946Z","completedAt":"2026-07-11T07:34:05.013Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":115,"totalTokens":16756,"reasoningTokens":43,"cachedTokens":0},"finalResponse":"```lua\nif vector1:DistToSqr(vector2) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: `DistToSqr` avoids the unnecessary square-root calculation required to obtain the actual distance.","model_patch":"```lua\nif vector1:DistToSqr(vector2) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: `DistToSqr` avoids the unnecessary square-root calculation required to obtain the actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5857,"startedAt":"2026-07-11T07:33:59.947Z","completedAt":"2026-07-11T07:34:05.811Z","answerBytes":202,"answerChars":202,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":145,"totalTokens":16784,"reasoningTokens":81,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit every entity here.\nend\n```\nReason: `ents.Iterator()` visits entities efficiently without first allocating the full table returned by `ents.GetAll()`.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit every entity here.\nend\n```\nReason: `ents.Iterator()` visits entities efficiently without first allocating the full table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":7363,"startedAt":"2026-07-11T07:34:00.299Z","completedAt":"2026-07-11T07:34:07.975Z","answerBytes":266,"answerChars":266,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16658,"completionTokens":195,"totalTokens":16853,"reasoningTokens":104,"cachedTokens":0},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 256)\nfor _, ent in ipairs(nearby) do\n    -- Process nearby entities.\nend\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for radius-based searches around a player, without relying on `FindInPVS`.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 256)\nfor _, ent in ipairs(nearby) do\n    -- Process nearby entities.\nend\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for radius-based searches around a player, without relying on `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10039,"startedAt":"2026-07-11T07:34:00.909Z","completedAt":"2026-07-11T07:34:11.089Z","answerBytes":471,"answerChars":471,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":347,"totalTokens":16997,"reasoningTokens":215,"cachedTokens":12032},"finalResponse":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterates only players and uses squared-distance checks, avoiding the broader entity spatial query, entity filtering, and square-root distance calculation.","model_patch":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterates only players and uses squared-distance checks, avoiding the broader entity spatial query, entity filtering, and square-root distance calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5907,"startedAt":"2026-07-11T07:34:00.940Z","completedAt":"2026-07-11T07:34:07.146Z","answerBytes":237,"answerChars":237,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":123,"totalTokens":16768,"reasoningTokens":48,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric `for` loop is generally faster than an equivalent `while` loop in Garry's Mod Lua because the runtime handles the counter update and termination with optimized loop operations.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric `for` loop is generally faster than an equivalent `while` loop in Garry's Mod Lua because the runtime handles the counter update and termination with optimized loop operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9277,"startedAt":"2026-07-11T07:34:01.037Z","completedAt":"2026-07-11T07:34:10.582Z","answerBytes":467,"answerChars":467,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16653,"completionTokens":311,"totalTokens":16964,"reasoningTokens":179,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyPlayers\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook.Run lookup and dispatch overhead for every player while preserving one iteration over the player list.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyPlayers\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook.Run lookup and dispatch overhead for every player while preserving one iteration over the player list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6960,"startedAt":"2026-07-11T07:34:01.173Z","completedAt":"2026-07-11T07:34:08.397Z","answerBytes":385,"answerChars":385,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":199,"totalTokens":16849,"reasoningTokens":68,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"Default\", 20, 20, color_white)\n    draw.SimpleText(health, \"Default\", 20, 40, color_white)\n    draw.SimpleText(health, \"Default\", 20, 60, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per frame and reuse the result for all three draw calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"Default\", 20, 20, color_white)\n    draw.SimpleText(health, \"Default\", 20, 40, color_white)\n    draw.SimpleText(health, \"Default\", 20, 60, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per frame and reuse the result for all three draw calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5645,"startedAt":"2026-07-11T07:34:01.182Z","completedAt":"2026-07-11T07:34:07.092Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":110,"totalTokens":16748,"reasoningTokens":25,"cachedTokens":16128},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    surface.SetDrawColor(white)\n    -- Paint code here\nend)\n```\nReason: Create the Color object once and reuse it instead of allocating one every paint iteration.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    surface.SetDrawColor(white)\n    -- Paint code here\nend)\n```\nReason: Create the Color object once and reuse it instead of allocating one every paint iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5314,"startedAt":"2026-07-11T07:34:01.414Z","completedAt":"2026-07-11T07:34:07.044Z","answerBytes":180,"answerChars":180,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":118,"totalTokens":16758,"reasoningTokens":47,"cachedTokens":16128},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Local lookup is faster than repeatedly indexing the global `math` table in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 1000000 do\n    local value = sin(i)\nend\n```\nReason: Local lookup is faster than repeatedly indexing the global `math` table in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6910,"startedAt":"2026-07-11T07:34:01.856Z","completedAt":"2026-07-11T07:34:08.940Z","answerBytes":454,"answerChars":454,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":204,"totalTokens":16847,"reasoningTokens":75,"cachedTokens":16128},"finalResponse":"```lua\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"Example\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply instead of calling LocalPlayer() repeatedly.\n        local health = ply:Health()\n    end\nend)\n```\nReason: Cache the player reference and refresh it only when invalid, avoiding repeated LocalPlayer() lookups while handling initialization and respawn-related invalidation.","model_patch":"```lua\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"Example\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply instead of calling LocalPlayer() repeatedly.\n        local health = ply:Health()\n    end\nend)\n```\nReason: Cache the player reference and refresh it only when invalid, avoiding repeated LocalPlayer() lookups while handling initialization and respawn-related invalidation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9895,"startedAt":"2026-07-11T07:34:01.936Z","completedAt":"2026-07-11T07:34:11.930Z","answerBytes":557,"answerChars":557,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":370,"totalTokens":17027,"reasoningTokens":191,"cachedTokens":16128},"finalResponse":"```lua\nlocal function ArePlayersLookingAtEachOther(p1, p2, threshold)\n    threshold = threshold or 0.5 -- 0.5 = within 60 degrees\n\n    local delta = p2:EyePos() - p1:EyePos()\n    local distance = delta:Length()\n    if distance == 0 then return true end\n\n    local toP2 = delta / distance\n    local toP1 = -toP2\n\n    return p1:GetAimVector():Dot(toP2) >= threshold\n       and p2:GetAimVector():Dot(toP1) >= threshold\nend\n```\nReason: Dot products compare aim alignment directly against a cosine threshold, avoiding the expensive `math.acos` angle calculation.","model_patch":"```lua\nlocal function ArePlayersLookingAtEachOther(p1, p2, threshold)\n    threshold = threshold or 0.5 -- 0.5 = within 60 degrees\n\n    local delta = p2:EyePos() - p1:EyePos()\n    local distance = delta:Length()\n    if distance == 0 then return true end\n\n    local toP2 = delta / distance\n    local toP1 = -toP2\n\n    return p1:GetAimVector():Dot(toP2) >= threshold\n       and p2:GetAimVector():Dot(toP1) >= threshold\nend\n```\nReason: Dot products compare aim alignment directly against a cosine threshold, avoiding the expensive `math.acos` angle calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6543,"startedAt":"2026-07-11T07:34:02.042Z","completedAt":"2026-07-11T07:34:08.589Z","answerBytes":143,"answerChars":143,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":188,"totalTokens":16837,"reasoningTokens":135,"cachedTokens":16128},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A local or upvalue helper call avoids the per-call `ply.SomeHelper` table lookup that colon syntax performs.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A local or upvalue helper call avoids the per-call `ply.SomeHelper` table lookup that colon syntax performs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6671,"startedAt":"2026-07-11T07:34:03.271Z","completedAt":"2026-07-11T07:34:09.943Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":168,"totalTokens":16810,"reasoningTokens":109,"cachedTokens":16128},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console with a newline and avoids `print`'s extra formatting and global output handling overhead.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console with a newline and avoids `print`'s extra formatting and global output handling overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5153,"startedAt":"2026-07-11T07:34:03.707Z","completedAt":"2026-07-11T07:34:08.954Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":110,"totalTokens":16758,"reasoningTokens":39,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Numeric `for` is typically fastest for large sequential arrays because it avoids iterator-function overhead from `pairs` and `ipairs`.","model_patch":"```lua\nfor i = 1, #values do\n    local value = values[i]\nend\n```\nReason: Numeric `for` is typically fastest for large sequential arrays because it avoids iterator-function overhead from `pairs` and `ipairs`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7756,"startedAt":"2026-07-11T07:34:03.885Z","completedAt":"2026-07-11T07:34:11.687Z","answerBytes":516,"answerChars":516,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16660,"completionTokens":264,"totalTokens":16924,"reasoningTokens":114,"cachedTokens":16128},"finalResponse":"```lua\n-- Equivalent to: fn.Map(fn.Filter(players, isAlive), getName)\n-- but with one pass and no intermediate list.\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local player = players[i]\n\n    if IsValid(player) and player:Alive() then\n        count = count + 1\n        names[count] = player:Nick()\n    end\nend\n```\nReason: The fused loop performs filtering and mapping in one traversal, avoiding the intermediate tables, extra traversals, and function-call overhead created by chained fn combinators.","model_patch":"```lua\n-- Equivalent to: fn.Map(fn.Filter(players, isAlive), getName)\n-- but with one pass and no intermediate list.\nlocal names = {}\nlocal count = 0\n\nfor i = 1, #players do\n    local player = players[i]\n\n    if IsValid(player) and player:Alive() then\n        count = count + 1\n        names[count] = player:Nick()\n    end\nend\n```\nReason: The fused loop performs filtering and mapping in one traversal, avoiding the intermediate tables, extra traversals, and function-call overhead created by chained fn combinators."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7868,"startedAt":"2026-07-11T07:34:04.119Z","completedAt":"2026-07-11T07:34:12.082Z","answerBytes":662,"answerChars":662,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":260,"totalTokens":16917,"reasoningTokens":80,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache\", RefreshPlayerCache)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-tick player logic here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only when the player list changes, so the Think hook iterates a cached table instead of rebuilding it every tick.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"Initialize\", \"RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache\", RefreshPlayerCache)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-tick player logic here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only when the player list changes, so the Think hook iterates a cached table instead of rebuilding it every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7927,"startedAt":"2026-07-11T07:34:04.174Z","completedAt":"2026-07-11T07:34:12.197Z","answerBytes":435,"answerChars":435,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":252,"totalTokens":16898,"reasoningTokens":117,"cachedTokens":16128},"finalResponse":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function setTempData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function getTempData(ply)\n    return playerData[ply]\nend\n\nsetTempData(ply, value)\nlocal value = getTempData(ply)\n```\nReason: A local table keyed by the player uses a direct table lookup and avoids entity field lookup overhead; weak keys prevent temporary data from keeping player entities alive.","model_patch":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function setTempData(ply, value)\n    playerData[ply] = value\nend\n\nlocal function getTempData(ply)\n    return playerData[ply]\nend\n\nsetTempData(ply, value)\nlocal value = getTempData(ply)\n```\nReason: A local table keyed by the player uses a direct table lookup and avoids entity field lookup overhead; weak keys prevent temporary data from keeping player entities alive."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":7266,"startedAt":"2026-07-11T07:34:04.334Z","completedAt":"2026-07-11T07:34:11.674Z","answerBytes":446,"answerChars":446,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":210,"totalTokens":16857,"reasoningTokens":66,"cachedTokens":16128},"finalResponse":"```lua\n-- Faster: sequential number-indexed array\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n\n-- Slower: string-keyed map\nlocal map = {\n    first = \"alpha\",\n    second = \"beta\",\n    third = \"gamma\"\n}\n\nfor key, value in pairs(map) do\nend\n```\nReason: Sequential number-indexed arrays use optimized contiguous storage and faster numeric iteration, while string-keyed maps require hash lookups.","model_patch":"```lua\n-- Faster: sequential number-indexed array\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\nend\n\n-- Slower: string-keyed map\nlocal map = {\n    first = \"alpha\",\n    second = \"beta\",\n    third = \"gamma\"\n}\n\nfor key, value in pairs(map) do\nend\n```\nReason: Sequential number-indexed arrays use optimized contiguous storage and faster numeric iteration, while string-keyed maps require hash lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5782,"startedAt":"2026-07-11T07:34:04.402Z","completedAt":"2026-07-11T07:34:10.324Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":117,"totalTokens":16767,"reasoningTokens":48,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Separate numeric arguments avoid passing or constructing a Color object in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Separate numeric arguments avoid passing or constructing a Color object in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5560,"startedAt":"2026-07-11T07:34:04.475Z","completedAt":"2026-07-11T07:34:10.184Z","answerBytes":214,"answerChars":214,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16670,"completionTokens":118,"totalTokens":16788,"reasoningTokens":50,"cachedTokens":16128},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. SQLStr(steamID))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. SQLStr(steamID))\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12464,"startedAt":"2026-07-11T07:34:04.623Z","completedAt":"2026-07-11T07:34:17.266Z","answerBytes":514,"answerChars":514,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":481,"totalTokens":17118,"reasoningTokens":317,"cachedTokens":16128},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path\nfor _, ply in ipairs(players) do\n    local steamID = CachedSteamID(ply)\n    -- use steamID repeatedly here\nend\n```\nReason: SteamID() runs once per player, while the weak-key cache avoids retaining player entities after they are released.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n\n-- Hot path\nfor _, ply in ipairs(players) do\n    local steamID = CachedSteamID(ply)\n    -- use steamID repeatedly here\nend\n```\nReason: SteamID() runs once per player, while the weak-key cache avoids retaining player entities after they are released."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":6170,"startedAt":"2026-07-11T07:34:04.999Z","completedAt":"2026-07-11T07:34:11.290Z","answerBytes":268,"answerChars":268,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":120,"totalTokens":16760,"reasoningTokens":30,"cachedTokens":16128},"finalResponse":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = get_piece(i)\nend\n\nlocal result = table.concat(parts)\n```\nReason: `table.concat` builds the final string in one pass, avoiding the repeated intermediate-string allocations caused by `result = result .. piece`.","model_patch":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = get_piece(i)\nend\n\nlocal result = table.concat(parts)\n```\nReason: `table.concat` builds the final string in one pass, avoiding the repeated intermediate-string allocations caused by `result = result .. piece`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8595,"startedAt":"2026-07-11T07:34:05.011Z","completedAt":"2026-07-11T07:34:13.710Z","answerBytes":220,"answerChars":220,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16644,"completionTokens":149,"totalTokens":16793,"reasoningTokens":65,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box path and overhead of `draw.RoundedBox(0, ...)`.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra rounded-box path and overhead of `draw.RoundedBox(0, ...)`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8615,"startedAt":"2026-07-11T07:34:05.112Z","completedAt":"2026-07-11T07:34:14.104Z","answerBytes":557,"answerChars":557,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":278,"totalTokens":16923,"reasoningTokens":93,"cachedTokens":16128},"finalResponse":"```lua\nsurface.CreateFont(\"HUDText\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500\n})\n\nlocal text = \"Hello, Garry's Mod\"\nlocal font = \"HUDText\"\n\nhook.Add(\"HUDPaint\", \"DrawFastText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the per-call setup and wrapper overhead of `draw.DrawText` and `draw.SimpleTextOutlined`; cache the font and keep `surface.SetFont` outside the frame hook when the font never changes.","model_patch":"```lua\nsurface.CreateFont(\"HUDText\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500\n})\n\nlocal text = \"Hello, Garry's Mod\"\nlocal font = \"HUDText\"\n\nhook.Add(\"HUDPaint\", \"DrawFastText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the per-call setup and wrapper overhead of `draw.DrawText` and `draw.SimpleTextOutlined`; cache the font and keep `surface.SetFont` outside the frame hook when the font never changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6928,"startedAt":"2026-07-11T07:34:05.358Z","completedAt":"2026-07-11T07:34:12.639Z","answerBytes":109,"answerChars":109,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":121,"totalTokens":16758,"reasoningTokens":79,"cachedTokens":16128},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: The length operator is preferred for sequential array-like tables.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: The length operator is preferred for sequential array-like tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6032,"startedAt":"2026-07-11T07:34:05.697Z","completedAt":"2026-07-11T07:34:11.844Z","answerBytes":256,"answerChars":256,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":137,"totalTokens":16779,"reasoningTokens":63,"cachedTokens":16128},"finalResponse":"```lua\n-- Generally faster when no other code needs the old table reference:\nt = {}\n```\nReason: t = {} replaces the table in constant time, while table.Empty(t) must remove its entries one by one; use table.Empty when existing references must remain valid.","model_patch":"```lua\n-- Generally faster when no other code needs the old table reference:\nt = {}\n```\nReason: t = {} replaces the table in constant time, while table.Empty(t) must remove its entries one by one; use table.Empty when existing references must remain valid."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6500,"startedAt":"2026-07-11T07:34:05.818Z","completedAt":"2026-07-11T07:34:12.320Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":155,"totalTokens":16797,"reasoningTokens":66,"cachedTokens":16128},"finalResponse":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif allowed[value] then\n    -- Value exists in the set.\nend\n```\nReason: `table.HasValue` scans a list linearly, while a keyed set performs near-constant-time lookup.","model_patch":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif allowed[value] then\n    -- Value exists in the set.\nend\n```\nReason: `table.HasValue` scans a list linearly, while a keyed set performs near-constant-time lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14484,"startedAt":"2026-07-11T07:34:06.398Z","completedAt":"2026-07-11T07:34:20.952Z","answerBytes":236,"answerChars":236,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":141,"totalTokens":16786,"reasoningTokens":67,"cachedTokens":16128},"finalResponse":"```lua\nlocal player = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor initializes the known fields during creation, avoiding separate field-assignment operations after the table is allocated.","model_patch":"```lua\nlocal player = {\n    name = \"Gordon\",\n    health = 100,\n    alive = true,\n}\n```\nReason: A table constructor initializes the known fields during creation, avoiding separate field-assignment operations after the table is allocated."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13061,"startedAt":"2026-07-11T07:34:07.145Z","completedAt":"2026-07-11T07:34:20.328Z","answerBytes":170,"answerChars":170,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":109,"totalTokens":16746,"reasoningTokens":56,"cachedTokens":16128},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables support direct index lookup, avoiding table.Random's general-purpose key iteration overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables support direct index lookup, avoiding table.Random's general-purpose key iteration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11848,"startedAt":"2026-07-11T07:34:07.184Z","completedAt":"2026-07-11T07:34:19.201Z","answerBytes":128,"answerChars":128,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16636,"completionTokens":69,"totalTokens":16705,"reasoningTokens":21,"cachedTokens":16128},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is faster and more direct than calling a power function in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is faster and more direct than calling a power function in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-luna@medium","model_name_or_path":"gpt-5.6-luna@medium","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":13014,"startedAt":"2026-07-11T07:34:07.234Z","completedAt":"2026-07-11T07:34:20.442Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":109,"totalTokens":16759,"reasoningTokens":46,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- Handle ply here\nend\n```\nReason: `player.Iterator()` visits every currently connected player without creating the snapshot table returned by `player.GetAll()`.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- Handle ply here\nend\n```\nReason: `player.Iterator()` visits every currently connected player without creating the snapshot table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13232,"startedAt":"2026-07-11T07:34:07.724Z","completedAt":"2026-07-11T07:34:21.095Z","answerBytes":233,"answerChars":233,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":429,"totalTokens":17068,"reasoningTokens":354,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Handle ent here.\n    end\nend\n```\nReason: ents.Iterator() visits entities lazily without first allocating a table containing every entity.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Handle ent here.\n    end\nend\n```\nReason: ents.Iterator() visits entities lazily without first allocating a table containing every entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":14580,"startedAt":"2026-07-11T07:34:08.082Z","completedAt":"2026-07-11T07:34:22.850Z","answerBytes":131,"answerChars":131,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":101,"totalTokens":16748,"reasoningTokens":47,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think on the Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":13167,"startedAt":"2026-07-11T07:34:08.300Z","completedAt":"2026-07-11T07:34:21.468Z","answerBytes":161,"answerChars":161,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":118,"totalTokens":16758,"reasoningTokens":57,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the reference points to a valid, non-removed entity before method calls.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` confirms the reference points to a valid, non-removed entity before method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6037,"startedAt":"2026-07-11T07:34:08.399Z","completedAt":"2026-07-11T07:34:14.438Z","answerBytes":185,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16633,"completionTokens":138,"totalTokens":16771,"reasoningTokens":75,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":31937,"startedAt":"2026-07-11T07:34:08.603Z","completedAt":"2026-07-11T07:34:40.542Z","answerBytes":375,"answerChars":375,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":1147,"totalTokens":17792,"reasoningTokens":1034,"cachedTokens":0},"finalResponse":"```lua\nlocal scratch = Angle(0, 0, 0)\n\n-- Reuse this only within the hot-path operation; do not retain it across calls.\nlocal function getZeroAngle()\n    scratch:Zero()\n    return scratch\nend\n\nlocal ang = getZeroAngle()\n```\nReason: Reusing and zeroing one scratch Angle avoids a new allocation and constructor call; use a pool when callers must retain distinct Angle objects.","model_patch":"```lua\nlocal scratch = Angle(0, 0, 0)\n\n-- Reuse this only within the hot-path operation; do not retain it across calls.\nlocal function getZeroAngle()\n    scratch:Zero()\n    return scratch\nend\n\nlocal ang = getZeroAngle()\n```\nReason: Reusing and zeroing one scratch Angle avoids a new allocation and constructor call; use a pool when callers must retain distinct Angle objects."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7280,"startedAt":"2026-07-11T07:34:09.011Z","completedAt":"2026-07-11T07:34:16.448Z","answerBytes":171,"answerChars":171,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":121,"totalTokens":16771,"reasoningTokens":60,"cachedTokens":16128},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal currentColor = addonColor\n```\nReason: A local variable avoids repeated table lookups and is faster to read frequently.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal currentColor = addonColor\n```\nReason: A local variable avoids repeated table lookups and is faster to read frequently."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16300,"startedAt":"2026-07-11T07:34:09.037Z","completedAt":"2026-07-11T07:34:25.473Z","answerBytes":273,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":335,"totalTokens":16973,"reasoningTokens":246,"cachedTokens":16128},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid relying on the networked variable directly:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` is DarkRP’s supported API and avoids coupling to its internal network-variable implementation.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid relying on the networked variable directly:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` is DarkRP’s supported API and avoids coupling to its internal network-variable implementation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13285,"startedAt":"2026-07-11T07:34:09.288Z","completedAt":"2026-07-11T07:34:22.574Z","answerBytes":229,"answerChars":229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":133,"totalTokens":16774,"reasoningTokens":62,"cachedTokens":16128},"finalResponse":"```lua\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: DistToSqr avoids the unnecessary square-root calculation; compare it with the squared threshold.","model_patch":"```lua\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: DistToSqr avoids the unnecessary square-root calculation; compare it with the squared threshold."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20252,"startedAt":"2026-07-11T07:34:10.098Z","completedAt":"2026-07-11T07:34:30.536Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":176,"totalTokens":16813,"reasoningTokens":106,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: ents.Iterator() visits entities without first allocating the full table returned by ents.GetAll(), making it the efficient choice for a complete entity traversal.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: ents.Iterator() visits entities without first allocating the full table returned by ents.GetAll(), making it the efficient choice for a complete entity traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":18273,"startedAt":"2026-07-11T07:34:10.322Z","completedAt":"2026-07-11T07:34:28.664Z","answerBytes":256,"answerChars":256,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16658,"completionTokens":299,"totalTokens":16957,"reasoningTokens":212,"cachedTokens":16128},"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 256)\nfor _, ent in ipairs(nearby) do\n    -- Process ent\nend\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for nearby entities without the visibility-oriented semantics of `FindInPVS`.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 256)\nfor _, ent in ipairs(nearby) do\n    -- Process ent\nend\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query for nearby entities without the visibility-oriented semantics of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17550,"startedAt":"2026-07-11T07:34:10.372Z","completedAt":"2026-07-11T07:34:27.949Z","answerBytes":479,"answerChars":479,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16652,"completionTokens":377,"totalTokens":17029,"reasoningTokens":242,"cachedTokens":16128},"finalResponse":"```lua\nlocal function FindPlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: It iterates only the player list and uses squared distance, avoiding the broader entity spatial query, entity filtering, and square-root distance calculation.","model_patch":"```lua\nlocal function FindPlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: It iterates only the player list and uses squared distance, avoiding the broader entity spatial query, entity filtering, and square-root distance calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14205,"startedAt":"2026-07-11T07:34:10.584Z","completedAt":"2026-07-11T07:34:24.792Z","answerBytes":171,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":151,"totalTokens":16798,"reasoningTokens":86,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, n do\n    -- count from 1 to n\nend\n```\nReason: Lua’s numeric `for` loop is generally faster because iteration and counter updates are handled by the VM.","model_patch":"```lua\nfor i = 1, n do\n    -- count from 1 to n\nend\n```\nReason: Lua’s numeric `for` loop is generally faster because iteration and counter updates are handled by the VM."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18283,"startedAt":"2026-07-11T07:34:10.594Z","completedAt":"2026-07-11T07:34:28.879Z","answerBytes":425,"answerChars":425,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16651,"completionTokens":386,"totalTokens":17037,"reasoningTokens":260,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"Think\", \"NotifyEveryPlayer\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandlePlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch replaces one dispatch per player, reducing repeated lookup and call overhead each tick.","model_patch":"```lua\nhook.Add(\"Think\", \"NotifyEveryPlayer\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandlePlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch replaces one dispatch per player, reducing repeated lookup and call overhead each tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17467,"startedAt":"2026-07-11T07:34:11.165Z","completedAt":"2026-07-11T07:34:28.712Z","answerBytes":409,"answerChars":409,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16652,"completionTokens":236,"totalTokens":16888,"reasoningTokens":100,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHUD\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 100, 100, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 100, 120, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 100, 140, color_white)\nend)\n```\nReason: Cache the health value once per frame instead of calling LocalPlayer():Health() three times.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHUD\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 100, 100, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 100, 120, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 100, 140, color_white)\nend)\n```\nReason: Cache the health value once per frame instead of calling LocalPlayer():Health() three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14421,"startedAt":"2026-07-11T07:34:11.357Z","completedAt":"2026-07-11T07:34:25.934Z","answerBytes":244,"answerChars":244,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16636,"completionTokens":178,"totalTokens":16814,"reasoningTokens":87,"cachedTokens":16128},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(white)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Create the Color object once and reuse it instead of allocating one on every paint iteration.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(white)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Create the Color object once and reuse it instead of allocating one on every paint iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6565,"startedAt":"2026-07-11T07:34:11.688Z","completedAt":"2026-07-11T07:34:18.341Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":103,"totalTokens":16741,"reasoningTokens":31,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\n    -- hot-loop work\nend\n```\nReason: Local lookup is typically faster than repeated table-field lookup through `math.sin`.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\n    -- hot-loop work\nend\n```\nReason: Local lookup is typically faster than repeated table-field lookup through `math.sin`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13691,"startedAt":"2026-07-11T07:34:11.690Z","completedAt":"2026-07-11T07:34:25.731Z","answerBytes":426,"answerChars":426,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":553,"totalTokens":17196,"reasoningTokens":434,"cachedTokens":0},"finalResponse":"```lua\n-- CLIENT\nlocal cachedLocalPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Use cachedLocalPlayer in hot paths after InitPostEntity.\nif IsValid(cachedLocalPlayer) then\n    cachedLocalPlayer:ChatPrint(\"Ready\")\nend\n```\nReason: Cache the player entity once after client initialization and reuse the local variable instead of repeatedly calling LocalPlayer().","model_patch":"```lua\n-- CLIENT\nlocal cachedLocalPlayer\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Use cachedLocalPlayer in hot paths after InitPostEntity.\nif IsValid(cachedLocalPlayer) then\n    cachedLocalPlayer:ChatPrint(\"Ready\")\nend\n```\nReason: Cache the player entity once after client initialization and reuse the local variable instead of repeatedly calling LocalPlayer()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17963,"startedAt":"2026-07-11T07:34:12.038Z","completedAt":"2026-07-11T07:34:30.506Z","answerBytes":722,"answerChars":722,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":737,"totalTokens":17394,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal function ArePlayersLookingAtEachOther(a, b, threshold)\n    threshold = threshold or 0.7 -- roughly within 45 degrees\n\n    local delta = b:GetShootPos() - a:GetShootPos()\n    local distanceSqr = delta:LengthSqr()\n    if distanceSqr == 0 then return false end\n\n    local minDotSqr = threshold * threshold\n    local dotA = a:GetAimVector():Dot(delta)\n    local dotB = b:GetAimVector():Dot(-delta)\n\n    return dotA > 0 and dotB > 0\n        and dotA * dotA >= minDotSqr * distanceSqr\n        and dotB * dotB >= minDotSqr * distanceSqr\nend\n```\nReason: Dot products test each aim vector against the direction to the other player, using squared comparisons to avoid `math.acos`, normalization, and extra square roots.","model_patch":"```lua\nlocal function ArePlayersLookingAtEachOther(a, b, threshold)\n    threshold = threshold or 0.7 -- roughly within 45 degrees\n\n    local delta = b:GetShootPos() - a:GetShootPos()\n    local distanceSqr = delta:LengthSqr()\n    if distanceSqr == 0 then return false end\n\n    local minDotSqr = threshold * threshold\n    local dotA = a:GetAimVector():Dot(delta)\n    local dotB = b:GetAimVector():Dot(-delta)\n\n    return dotA > 0 and dotB > 0\n        and dotA * dotA >= minDotSqr * distanceSqr\n        and dotB * dotB >= minDotSqr * distanceSqr\nend\n```\nReason: Dot products test each aim vector against the direction to the other player, using squared comparisons to avoid `math.acos`, normalization, and extra square roots."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19127,"startedAt":"2026-07-11T07:34:12.196Z","completedAt":"2026-07-11T07:34:31.818Z","answerBytes":141,"answerChars":141,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":419,"totalTokens":17068,"reasoningTokens":364,"cachedTokens":16128},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: It generally avoids the receiver method lookup; `ply:SomeHelper()` is equivalent to `ply.SomeHelper(ply)`.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: It generally avoids the receiver method lookup; `ply:SomeHelper()` is equivalent to `ply.SomeHelper(ply)`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14334,"startedAt":"2026-07-11T07:34:12.304Z","completedAt":"2026-07-11T07:34:26.961Z","answerBytes":186,"answerChars":186,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":205,"totalTokens":16847,"reasoningTokens":141,"cachedTokens":16128},"finalResponse":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console with a trailing newline and avoids `print`'s general-purpose argument handling, making it faster in hot paths.","model_patch":"```lua\nMsgN(\"debug line\")\n```\nReason: `MsgN` writes directly to the console with a trailing newline and avoids `print`'s general-purpose argument handling, making it faster in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21291,"startedAt":"2026-07-11T07:34:12.353Z","completedAt":"2026-07-11T07:34:33.972Z","answerBytes":310,"answerChars":310,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":171,"totalTokens":16819,"reasoningTokens":78,"cachedTokens":16128},"finalResponse":"```lua\nlocal count = #numbers\nfor i = 1, count do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` with a cached length typically has the least iterator and allocation overhead for dense sequential arrays; `ipairs` adds iterator overhead, while `pairs` is unordered and more general.","model_patch":"```lua\nlocal count = #numbers\nfor i = 1, count do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` with a cached length typically has the least iterator and allocation overhead for dense sequential arrays; `ipairs` adds iterator overhead, while `pairs` is unordered and more general."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20287,"startedAt":"2026-07-11T07:34:12.398Z","completedAt":"2026-07-11T07:34:33.136Z","answerBytes":580,"answerChars":580,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16658,"completionTokens":343,"totalTokens":17001,"reasoningTokens":173,"cachedTokens":16128},"finalResponse":"```lua\n-- Combinator pipeline:\n-- local result = fn.Map(function(ply) return ply:Nick() end,\n--     fn.Filter(function(ply) return IsValid(ply) and ply:IsAdmin() end, player.GetAll()))\n\n-- Fused filter + map: one pass, one result table, no intermediate list.\nlocal result = {}\nfor _, ply in ipairs(player.GetAll()) do\n    if IsValid(ply) and ply:IsAdmin() then\n        result[#result + 1] = ply:Nick()\n    end\nend\n```\nReason: The fused loop performs filtering and mapping in one traversal and avoids the intermediate table and extra function calls created by separate combinators.","model_patch":"```lua\n-- Combinator pipeline:\n-- local result = fn.Map(function(ply) return ply:Nick() end,\n--     fn.Filter(function(ply) return IsValid(ply) and ply:IsAdmin() end, player.GetAll()))\n\n-- Fused filter + map: one pass, one result table, no intermediate list.\nlocal result = {}\nfor _, ply in ipairs(player.GetAll()) do\n    if IsValid(ply) and ply:IsAdmin() then\n        result[#result + 1] = ply:Nick()\n    end\nend\n```\nReason: The fused loop performs filtering and mapping in one traversal and avoids the intermediate table and extra function calls created by separate combinators."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19296,"startedAt":"2026-07-11T07:34:12.774Z","completedAt":"2026-07-11T07:34:32.566Z","answerBytes":592,"answerChars":592,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16659,"completionTokens":432,"totalTokens":17091,"reasoningTokens":255,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayer\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UncachePlayer\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        -- Process ply here\n    end\nend)\n```\nReason: `player.GetAll()` runs once initially and the cache changes only on player join or disconnect, so each tick iterates the existing cache directly.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayer\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UncachePlayer\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        -- Process ply here\n    end\nend)\n```\nReason: `player.GetAll()` runs once initially and the cache changes only on player join or disconnect, so each tick iterates the existing cache directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14897,"startedAt":"2026-07-11T07:34:12.977Z","completedAt":"2026-07-11T07:34:28.219Z","answerBytes":268,"answerChars":268,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":604,"totalTokens":17246,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal tempByPlayer = setmetatable({}, { __mode = \"k\" })\n\ntempByPlayer[ply] = value\nlocal value = tempByPlayer[ply]\n```\nReason: A local Lua table avoids entity-field lookup overhead, and weak keys let player entries disappear when the player object is collected.","model_patch":"```lua\nlocal tempByPlayer = setmetatable({}, { __mode = \"k\" })\n\ntempByPlayer[ply] = value\nlocal value = tempByPlayer[ply]\n```\nReason: A local Lua table avoids entity-field lookup overhead, and weak keys let player entries disappear when the player object is collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14494,"startedAt":"2026-07-11T07:34:13.846Z","completedAt":"2026-07-11T07:34:28.599Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":184,"totalTokens":16827,"reasoningTokens":99,"cachedTokens":16128},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use Lua's optimized array part and iterate faster than string-keyed maps.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use Lua's optimized array part and iterate faster than string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14911,"startedAt":"2026-07-11T07:34:14.183Z","completedAt":"2026-07-11T07:34:29.199Z","answerBytes":164,"answerChars":164,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":191,"totalTokens":16841,"reasoningTokens":125,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing separate numbers avoids Color-object handling in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing separate numbers avoids Color-object handling in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13303,"startedAt":"2026-07-11T07:34:14.643Z","completedAt":"2026-07-11T07:34:28.119Z","answerBytes":210,"answerChars":210,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16668,"completionTokens":135,"totalTokens":16803,"reasoningTokens":70,"cachedTokens":16128},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids remote network round trips for a single server.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids remote network round trips for a single server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16695,"startedAt":"2026-07-11T07:34:16.447Z","completedAt":"2026-07-11T07:34:33.315Z","answerBytes":540,"answerChars":540,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":368,"totalTokens":17007,"reasoningTokens":196,"cachedTokens":16128},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n\nfor _, ply in ipairs(player.GetAll()) do\n    local steamID = CachedSteamID(ply)\n    -- Hot-path work using steamID...\nend\n```\nReason: It calls ply:SteamID() once per player, then reuses the cached string while weak keys allow discarded player objects to be garbage-collected.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n\n    return steamID\nend\n\nfor _, ply in ipairs(player.GetAll()) do\n    local steamID = CachedSteamID(ply)\n    -- Hot-path work using steamID...\nend\n```\nReason: It calls ply:SteamID() once per player, then reuses the cached string while weak keys allow discarded player objects to be garbage-collected."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":14351,"startedAt":"2026-07-11T07:34:16.565Z","completedAt":"2026-07-11T07:34:30.974Z","answerBytes":457,"answerChars":457,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":210,"totalTokens":16852,"reasoningTokens":82,"cachedTokens":0},"finalResponse":"```lua\n-- Slower: repeated concatenation creates intermediate strings.\nlocal result = \"\"\nfor _, piece in ipairs(pieces) do\n    result = result .. piece\nend\n\n-- Faster: collect pieces, then concatenate once.\nlocal parts = {}\nfor _, piece in ipairs(pieces) do\n    parts[#parts + 1] = piece\nend\nlocal result = table.concat(parts)\n```\nReason: table.concat combines the pieces in one pass, avoiding repeated intermediate-string allocations from .. concatenation.","model_patch":"```lua\n-- Slower: repeated concatenation creates intermediate strings.\nlocal result = \"\"\nfor _, piece in ipairs(pieces) do\n    result = result .. piece\nend\n\n-- Faster: collect pieces, then concatenate once.\nlocal parts = {}\nfor _, piece in ipairs(pieces) do\n    parts[#parts + 1] = piece\nend\nlocal result = table.concat(parts)\n```\nReason: table.concat combines the pieces in one pass, avoiding repeated intermediate-string allocations from .. concatenation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17860,"startedAt":"2026-07-11T07:34:17.283Z","completedAt":"2026-07-11T07:34:35.213Z","answerBytes":153,"answerChars":153,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":338,"totalTokens":16986,"reasoningTokens":275,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids `draw.RoundedBox`'s wrapper and zero-radius branch.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids `draw.RoundedBox`'s wrapper and zero-radius branch."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22957,"startedAt":"2026-07-11T07:34:18.446Z","completedAt":"2026-07-11T07:34:41.642Z","answerBytes":509,"answerChars":509,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":687,"totalTokens":17332,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nsurface.CreateFont(\"HUD_SingleLine\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n})\n\nlocal text = \"Status: ready\"\n\nhook.Add(\"HUDPaint\", \"DrawSingleLine\", function()\n    surface.SetFont(\"HUD_SingleLine\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the alignment, sizing, and repeated multi-pass work used by helpers; `SimpleTextOutlined` is slower because it draws the text multiple times.","model_patch":"```lua\nsurface.CreateFont(\"HUD_SingleLine\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n})\n\nlocal text = \"Status: ready\"\n\nhook.Add(\"HUDPaint\", \"DrawSingleLine\", function()\n    surface.SetFont(\"HUD_SingleLine\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the alignment, sizing, and repeated multi-pass work used by helpers; `SimpleTextOutlined` is slower because it draws the text multiple times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12306,"startedAt":"2026-07-11T07:34:19.204Z","completedAt":"2026-07-11T07:34:31.513Z","answerBytes":130,"answerChars":130,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":107,"totalTokens":16744,"reasoningTokens":57,"cachedTokens":16128},"finalResponse":"```lua\nlocal length = #array\n```\nReason: The `#` operator is the preferred way to get the length of a sequential array-like table.","model_patch":"```lua\nlocal length = #array\n```\nReason: The `#` operator is the preferred way to get the length of a sequential array-like table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13727,"startedAt":"2026-07-11T07:34:20.363Z","completedAt":"2026-07-11T07:34:34.148Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16644,"completionTokens":183,"totalTokens":16827,"reasoningTokens":119,"cachedTokens":16128},"finalResponse":"```lua\nt = {}\n```\nReason: `t = {}` is generally faster because it replaces the reference without clearing each existing entry; use `table.Empty(t)` only when other references must see the same table emptied.","model_patch":"```lua\nt = {}\n```\nReason: `t = {}` is generally faster because it replaces the reference without clearing each existing entry; use `table.Empty(t)` only when other references must see the same table emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13929,"startedAt":"2026-07-11T07:34:20.499Z","completedAt":"2026-07-11T07:34:34.477Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":192,"totalTokens":16834,"reasoningTokens":106,"cachedTokens":16128},"finalResponse":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: Set lookup is O(1) on average, while table.HasValue scans the list in O(n).","model_patch":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: Set lookup is O(1) on average, while table.HasValue scans the list in O(n)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14530,"startedAt":"2026-07-11T07:34:20.984Z","completedAt":"2026-07-11T07:34:35.619Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":221,"totalTokens":16862,"reasoningTokens":145,"cachedTokens":16128},"finalResponse":"```lua\nlocal playerData = {\n    name = \"Gordon\",\n    score = 100,\n    alive = true,\n}\n```\nReason: A table constructor creates the table and populates its known fields in one operation, avoiding separate field-assignment steps.","model_patch":"```lua\nlocal playerData = {\n    name = \"Gordon\",\n    score = 100,\n    alive = true,\n}\n```\nReason: A table constructor creates the table and populates its known fields in one operation, avoiding separate field-assignment steps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12872,"startedAt":"2026-07-11T07:34:21.097Z","completedAt":"2026-07-11T07:34:33.971Z","answerBytes":191,"answerChars":191,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":153,"totalTokens":16792,"reasoningTokens":96,"cachedTokens":0},"finalResponse":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: Sequential tables support direct indexed lookup, avoiding the extra work table.Random performs to select and retrieve an element.","model_patch":"```lua\nlocal value = values[math.random(#values)]\n```\nReason: Sequential tables support direct indexed lookup, avoiding the extra work table.Random performs to select and retrieve an element."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12071,"startedAt":"2026-07-11T07:34:21.472Z","completedAt":"2026-07-11T07:34:33.562Z","answerBytes":114,"answerChars":114,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16636,"completionTokens":82,"totalTokens":16718,"reasoningTokens":35,"cachedTokens":16128},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of calling `math.pow` in a tight loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of calling `math.pow` in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-luna@high","model_name_or_path":"gpt-5.6-luna@high","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":14041,"startedAt":"2026-07-11T07:34:22.607Z","completedAt":"2026-07-11T07:34:36.772Z","answerBytes":186,"answerChars":186,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16652,"completionTokens":217,"totalTokens":16869,"reasoningTokens":151,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- Handle ply here\nend\n```\nReason: `player.GetAll()` returns the currently connected players as an array, so `ipairs` visits each one.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- Handle ply here\nend\n```\nReason: `player.GetAll()` returns the currently connected players as an array, so `ipairs` visits each one."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18273,"startedAt":"2026-07-11T07:34:22.926Z","completedAt":"2026-07-11T07:34:41.258Z","answerBytes":194,"answerChars":194,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":349,"totalTokens":16992,"reasoningTokens":285,"cachedTokens":16128},"finalResponse":"```lua\nfor ent in ents.Iterator(\"prop_physics\") do\n    -- Process ent here\nend\n```\nReason: ents.Iterator(\"prop_physics\") lazily visits matching entities without first allocating a table of them.","model_patch":"```lua\nfor ent in ents.Iterator(\"prop_physics\") do\n    -- Process ent here\nend\n```\nReason: ents.Iterator(\"prop_physics\") lazily visits matching entities without first allocating a table of them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":12663,"startedAt":"2026-07-11T07:34:24.912Z","completedAt":"2026-07-11T07:34:37.673Z","answerBytes":142,"answerChars":142,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":108,"totalTokens":16755,"reasoningTokens":51,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think so it runs on the Think hook.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers the callback under MyAddon.Think so it runs on the Think hook."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":16298,"startedAt":"2026-07-11T07:34:25.479Z","completedAt":"2026-07-11T07:34:41.780Z","answerBytes":144,"answerChars":144,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16644,"completionTokens":264,"totalTokens":16908,"reasoningTokens":208,"cachedTokens":16128},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid(ent) confirms the reference is not NULL or removed before method calls.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: IsValid(ent) confirms the reference is not NULL or removed before method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12252,"startedAt":"2026-07-11T07:34:25.738Z","completedAt":"2026-07-11T07:34:37.999Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16637,"completionTokens":115,"totalTokens":16752,"reasoningTokens":54,"cachedTokens":16128},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":58407,"startedAt":"2026-07-11T07:34:25.939Z","completedAt":"2026-07-11T07:35:24.350Z","answerBytes":425,"answerChars":425,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":2708,"totalTokens":19353,"reasoningTokens":2588,"cachedTokens":16128},"finalResponse":"```lua\n-- Slow: allocates a new Angle userdata on every call.\nlocal function slowZeroAngle()\n    return Angle()\nend\n\n-- Fast: allocate once, then reset and reuse it.\nlocal scratchAngle = Angle()\n\nlocal function fastZeroAngle()\n    scratchAngle:Zero()\n    return scratchAngle\nend\n```\nReason: `fastZeroAngle` avoids repeated userdata allocation; use it only when callers do not retain or concurrently mutate the returned Angle.","model_patch":"```lua\n-- Slow: allocates a new Angle userdata on every call.\nlocal function slowZeroAngle()\n    return Angle()\nend\n\n-- Fast: allocate once, then reset and reuse it.\nlocal scratchAngle = Angle()\n\nlocal function fastZeroAngle()\n    scratchAngle:Zero()\n    return scratchAngle\nend\n```\nReason: `fastZeroAngle` avoids repeated userdata allocation; use it only when callers do not retain or concurrently mutate the returned Angle."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14610,"startedAt":"2026-07-11T07:34:26.964Z","completedAt":"2026-07-11T07:34:41.575Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":246,"totalTokens":16896,"reasoningTokens":181,"cachedTokens":16128},"finalResponse":"```lua\nlocal ADDON_COLOR = Color(255, 0, 0, 255)\n\nlocal color = ADDON_COLOR\n```\nReason: A local variable avoids repeated table lookups and global-environment resolution.","model_patch":"```lua\nlocal ADDON_COLOR = Color(255, 0, 0, 255)\n\nlocal color = ADDON_COLOR\n```\nReason: A local variable avoids repeated table lookups and global-environment resolution."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12604,"startedAt":"2026-07-11T07:34:27.956Z","completedAt":"2026-07-11T07:34:40.605Z","answerBytes":214,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":544,"totalTokens":17186,"reasoningTokens":466,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred\n-- Avoid: ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` uses DarkRP’s job data API; the generic NW string is not the authoritative interface.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred\n-- Avoid: ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` uses DarkRP’s job data API; the generic NW string is not the authoritative interface."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12830,"startedAt":"2026-07-11T07:34:28.141Z","completedAt":"2026-07-11T07:34:41.043Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":137,"totalTokens":16782,"reasoningTokens":68,"cachedTokens":16128},"finalResponse":"```lua\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within range.\nend\n```\nReason: `DistToSqr` avoids the square-root cost of calculating the actual distance.","model_patch":"```lua\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within range.\nend\n```\nReason: `DistToSqr` avoids the square-root cost of calculating the actual distance."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12417,"startedAt":"2026-07-11T07:34:28.220Z","completedAt":"2026-07-11T07:34:40.639Z","answerBytes":194,"answerChars":194,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":345,"totalTokens":16986,"reasoningTokens":282,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Process ent here.\nend\n```\nReason: `ents.Iterator()` visits all entities efficiently without first allocating the table returned by `ents.GetAll()`.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Process ent here.\nend\n```\nReason: `ents.Iterator()` visits all entities efficiently without first allocating the table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":21828,"startedAt":"2026-07-11T07:34:28.601Z","completedAt":"2026-07-11T07:34:50.433Z","answerBytes":418,"answerChars":418,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16658,"completionTokens":642,"totalTokens":17300,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal radius = 512\nlocal pos = ply:GetPos()\nlocal bounds = Vector(radius, radius, radius)\n\nfor _, ent in ipairs(ents.FindInBox(pos - bounds, pos + bounds)) do\n    if ent ~= ply and IsValid(ent) then\n        -- Handle nearby entity.\n    end\nend\n```\nReason: `ents.FindInBox` is typically faster than sphere-based queries; use the box as a cheap candidate filter and apply an exact distance check only when needed.","model_patch":"```lua\nlocal radius = 512\nlocal pos = ply:GetPos()\nlocal bounds = Vector(radius, radius, radius)\n\nfor _, ent in ipairs(ents.FindInBox(pos - bounds, pos + bounds)) do\n    if ent ~= ply and IsValid(ent) then\n        -- Handle nearby entity.\n    end\nend\n```\nReason: `ents.FindInBox` is typically faster than sphere-based queries; use the box as a cheap candidate filter and apply an exact distance check only when needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24099,"startedAt":"2026-07-11T07:34:28.665Z","completedAt":"2026-07-11T07:34:52.767Z","answerBytes":471,"answerChars":471,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16654,"completionTokens":645,"totalTokens":17299,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterate only players and compare squared distances, avoiding the broader entity search, player-type filtering, square roots, and unnecessary distance calculations.","model_patch":"```lua\nlocal function PlayersWithinRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n\n    for ply in player.Iterator() do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterate only players and compare squared distances, avoiding the broader entity search, player-type filtering, square roots, and unnecessary distance calculations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8364,"startedAt":"2026-07-11T07:34:28.750Z","completedAt":"2026-07-11T07:34:37.205Z","answerBytes":175,"answerChars":175,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":241,"totalTokens":16890,"reasoningTokens":177,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric `for` uses a specialized counted-loop operation and is generally faster than manually incrementing a `while` loop.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric `for` uses a specialized counted-loop operation and is generally faster than manually incrementing a `while` loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20203,"startedAt":"2026-07-11T07:34:28.901Z","completedAt":"2026-07-11T07:34:49.132Z","answerBytes":396,"answerChars":396,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":490,"totalTokens":17147,"reasoningTokens":369,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyAllPlayers\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply.\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook lookup and callback-dispatch overhead for every player.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyAllPlayers\", function()\n    hook.Run(\"CustomPlayerTick\", player.GetAll())\nend)\n\nhook.Add(\"CustomPlayerTick\", \"ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply.\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook lookup and callback-dispatch overhead for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18012,"startedAt":"2026-07-11T07:34:29.234Z","completedAt":"2026-07-11T07:34:47.371Z","answerBytes":505,"answerChars":505,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":399,"totalTokens":17049,"reasoningTokens":231,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local player = LocalPlayer()\n    if not IsValid(player) then return end\n\n    local health = player:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(math.max(health, 0), \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once per frame instead of recomputing them for every draw call.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local player = LocalPlayer()\n    if not IsValid(player) then return end\n\n    local health = player:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(math.max(health, 0), \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once per frame instead of recomputing them for every draw call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13751,"startedAt":"2026-07-11T07:34:30.531Z","completedAt":"2026-07-11T07:34:44.318Z","answerBytes":237,"answerChars":237,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":182,"totalTokens":16820,"reasoningTokens":92,"cachedTokens":16128},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(white)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Create the Color object once instead of allocating a new one on every paint iteration.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(white)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Create the Color object once instead of allocating a new one on every paint iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14123,"startedAt":"2026-07-11T07:34:30.558Z","completedAt":"2026-07-11T07:34:44.699Z","answerBytes":194,"answerChars":194,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":210,"totalTokens":16850,"reasoningTokens":136,"cachedTokens":16128},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, sampleCount do\n    local value = sin(angle[i])\n    -- process value\nend\n```\nReason: Cache `math.sin` in a local so each iteration avoids the table lookup.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, sampleCount do\n    local value = sin(angle[i])\n    -- process value\nend\n```\nReason: Cache `math.sin` in a local so each iteration avoids the table lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":32612,"startedAt":"2026-07-11T07:34:30.990Z","completedAt":"2026-07-11T07:35:03.633Z","answerBytes":397,"answerChars":397,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":1162,"totalTokens":17805,"reasoningTokens":1034,"cachedTokens":16128},"finalResponse":"```lua\nlocal lp = LocalPlayer()\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\nhook.Add(\"HUDPaint\", \"DrawPlayerInfo\", function()\n    if not IsValid(lp) then return end\n\n    local health = lp:Health()\n    -- Reuse lp throughout this hot path.\nend)\n```\nReason: Cache the player entity in a local upvalue and reuse it, avoiding repeated LocalPlayer() lookups.","model_patch":"```lua\nlocal lp = LocalPlayer()\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\nhook.Add(\"HUDPaint\", \"DrawPlayerInfo\", function()\n    if not IsValid(lp) then return end\n\n    local health = lp:Health()\n    -- Reuse lp throughout this hot path.\nend)\n```\nReason: Cache the player entity in a local upvalue and reuse it, avoiding repeated LocalPlayer() lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":23442,"startedAt":"2026-07-11T07:34:31.584Z","completedAt":"2026-07-11T07:34:55.101Z","answerBytes":532,"answerChars":532,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16659,"completionTokens":712,"totalTokens":17371,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal function RoughlyLookingAtEachOther(p1, p2, minDot)\n    if not IsValid(p1) or not IsValid(p2) or p1 == p2 then\n        return false\n    end\n\n    minDot = minDot or 0.8 -- about 37 degrees\n\n    local p1ToP2 = (p2:EyePos() - p1:EyePos()):GetNormalized()\n    local p2ToP1 = -p1ToP2\n\n    return p1:GetAimVector():Dot(p1ToP2) >= minDot\n       and p2:GetAimVector():Dot(p2ToP1) >= minDot\nend\n```\nReason: Dot products compare aim alignment directly against a cosine threshold, avoiding the slower `math.acos` angle calculation.","model_patch":"```lua\nlocal function RoughlyLookingAtEachOther(p1, p2, minDot)\n    if not IsValid(p1) or not IsValid(p2) or p1 == p2 then\n        return false\n    end\n\n    minDot = minDot or 0.8 -- about 37 degrees\n\n    local p1ToP2 = (p2:EyePos() - p1:EyePos()):GetNormalized()\n    local p2ToP1 = -p1ToP2\n\n    return p1:GetAimVector():Dot(p1ToP2) >= minDot\n       and p2:GetAimVector():Dot(p2ToP1) >= minDot\nend\n```\nReason: Dot products compare aim alignment directly against a cosine threshold, avoiding the slower `math.acos` angle calculation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17156,"startedAt":"2026-07-11T07:34:31.997Z","completedAt":"2026-07-11T07:34:49.287Z","answerBytes":141,"answerChars":141,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16653,"completionTokens":347,"totalTokens":17000,"reasoningTokens":295,"cachedTokens":16128},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Prefer a local/direct function call; `ply:SomeHelper()` performs method lookup and is generally no faster.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Prefer a local/direct function call; `ply:SomeHelper()` performs method lookup and is generally no faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15760,"startedAt":"2026-07-11T07:34:32.729Z","completedAt":"2026-07-11T07:34:48.695Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":277,"totalTokens":16919,"reasoningTokens":211,"cachedTokens":16128},"finalResponse":"```lua\nMsgN(\"[debug] value = \", value)\n```\nReason: `MsgN` writes directly to the Garry's Mod console with a newline and avoids the extra overhead of Lua's `print` formatting.","model_patch":"```lua\nMsgN(\"[debug] value = \", value)\n```\nReason: `MsgN` writes directly to the Garry's Mod console with a newline and avoids the extra overhead of Lua's `print` formatting."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14097,"startedAt":"2026-07-11T07:34:33.138Z","completedAt":"2026-07-11T07:34:47.239Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16654,"completionTokens":163,"totalTokens":16817,"reasoningTokens":89,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- process(value)\nend\n```\nReason: Numeric `for` avoids the iterator overhead of `pairs` and `ipairs` and directly indexes the sequential array.","model_patch":"```lua\nfor i = 1, #values do\n    local value = values[i]\n    -- process(value)\nend\n```\nReason: Numeric `for` avoids the iterator overhead of `pairs` and `ipairs` and directly indexes the sequential array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":31431,"startedAt":"2026-07-11T07:34:33.360Z","completedAt":"2026-07-11T07:35:04.932Z","answerBytes":608,"answerChars":608,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16662,"completionTokens":1178,"totalTokens":17840,"reasoningTokens":999,"cachedTokens":16128},"finalResponse":"```lua\n-- Equivalent to: map(getSteamID, filter(isWantedAndAlive, player.GetAll()))\nlocal function WantedAliveSteamIDs(players)\n    local ids = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply)\n            and ply:Alive()\n            and ply:getDarkRPVar(\"wanted\") then\n            count = count + 1\n            ids[count] = ply:SteamID()\n        end\n    end\n\n    return ids\nend\n\nlocal steamIDs = WantedAliveSteamIDs(player.GetAll())\n```\nReason: One loop avoids callback dispatch and the intermediate table allocated by separate filter and map passes.","model_patch":"```lua\n-- Equivalent to: map(getSteamID, filter(isWantedAndAlive, player.GetAll()))\nlocal function WantedAliveSteamIDs(players)\n    local ids = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply)\n            and ply:Alive()\n            and ply:getDarkRPVar(\"wanted\") then\n            count = count + 1\n            ids[count] = ply:SteamID()\n        end\n    end\n\n    return ids\nend\n\nlocal steamIDs = WantedAliveSteamIDs(player.GetAll())\n```\nReason: One loop avoids callback dispatch and the intermediate table allocated by separate filter and map passes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22825,"startedAt":"2026-07-11T07:34:33.612Z","completedAt":"2026-07-11T07:34:56.518Z","answerBytes":663,"answerChars":663,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16659,"completionTokens":660,"totalTokens":17319,"reasoningTokens":466,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\n-- Populate once for players already connected when this file loads.\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayer\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UncachePlayer\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        -- Per-tick player logic here.\n    end\nend)\n```\nReason: The player list is built once and updated only on join or leave, so Think iterates the cache without calling player.GetAll() every tick.","model_patch":"```lua\nlocal cachedPlayers = {}\n\n-- Populate once for players already connected when this file loads.\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayer\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UncachePlayer\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        -- Per-tick player logic here.\n    end\nend)\n```\nReason: The player list is built once and updated only on join or leave, so Think iterates the cache without calling player.GetAll() every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21670,"startedAt":"2026-07-11T07:34:33.995Z","completedAt":"2026-07-11T07:34:55.811Z","answerBytes":298,"answerChars":298,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":610,"totalTokens":17256,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal tempData = setmetatable({}, { __mode = \"k\" })\n\ntempData[ply] = value\nlocal value = tempData[ply]\n```\nReason: A local table performs a direct lookup, avoiding the entity/metatable field-access path; weak keys allow entries to be collected when the player object is no longer referenced.","model_patch":"```lua\nlocal tempData = setmetatable({}, { __mode = \"k\" })\n\ntempData[ply] = value\nlocal value = tempData[ply]\n```\nReason: A local table performs a direct lookup, avoiding the entity/metatable field-access path; weak keys allow entries to be collected when the player object is no longer referenced."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17182,"startedAt":"2026-07-11T07:34:34.015Z","completedAt":"2026-07-11T07:34:51.331Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":317,"totalTokens":16966,"reasoningTokens":235,"cachedTokens":16128},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Dense sequential number-indexed arrays use faster array-style access than string-keyed maps.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Dense sequential number-indexed arrays use faster array-style access than string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14218,"startedAt":"2026-07-11T07:34:34.216Z","completedAt":"2026-07-11T07:34:48.653Z","answerBytes":193,"answerChars":193,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16652,"completionTokens":146,"totalTokens":16798,"reasoningTokens":75,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing separate numeric channels avoids constructing or looking up a Color object in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing separate numeric channels avoids constructing or looking up a Color object in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13826,"startedAt":"2026-07-11T07:34:34.480Z","completedAt":"2026-07-11T07:34:48.311Z","answerBytes":242,"answerChars":242,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16670,"completionTokens":138,"totalTokens":16808,"reasoningTokens":68,"cachedTokens":16128},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips and remote MySQL connection overhead for a single server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT value FROM player_data WHERE steamid = '...' LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips and remote MySQL connection overhead for a single server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20148,"startedAt":"2026-07-11T07:34:35.340Z","completedAt":"2026-07-11T07:34:55.697Z","answerBytes":452,"answerChars":452,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":510,"totalTokens":17155,"reasoningTokens":365,"cachedTokens":16128},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function cachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = cachedSteamID(ply)\n```\nReason: A weak-key cache avoids repeated SteamID() calls while allowing entries to be garbage-collected when player objects are released.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function cachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\n-- Hot path:\nlocal steamID = cachedSteamID(ply)\n```\nReason: A weak-key cache avoids repeated SteamID() calls while allowing entries to be garbage-collected when player objects are released."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":21665,"startedAt":"2026-07-11T07:34:35.745Z","completedAt":"2026-07-11T07:34:57.661Z","answerBytes":348,"answerChars":348,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":615,"totalTokens":17257,"reasoningTokens":492,"cachedTokens":16128},"finalResponse":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = GetSmallPiece(i)\nend\n\n-- Slower: repeated concatenation\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: concatenate once\nlocal fast = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the growing string on every `..` operation.","model_patch":"```lua\nlocal pieces = {}\n\nfor i = 1, 10000 do\n    pieces[i] = GetSmallPiece(i)\nend\n\n-- Slower: repeated concatenation\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: concatenate once\nlocal fast = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the growing string on every `..` operation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20433,"startedAt":"2026-07-11T07:34:36.897Z","completedAt":"2026-07-11T07:34:57.413Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":507,"totalTokens":17153,"reasoningTokens":428,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the extra `draw.RoundedBox` helper overhead; set the color once when drawing many rectangles.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the extra `draw.RoundedBox` helper overhead; set the color once when drawing many rectangles."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22068,"startedAt":"2026-07-11T07:34:37.210Z","completedAt":"2026-07-11T07:34:59.282Z","answerBytes":445,"answerChars":445,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16645,"completionTokens":659,"totalTokens":17304,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal font = \"DermaDefault\"\nlocal text = \"Single-line HUD text\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the per-call wrapper work performed by `draw.DrawText` and `draw.SimpleTextOutlined`; use the direct surface state calls when no outline is needed.","model_patch":"```lua\nlocal font = \"DermaDefault\"\nlocal text = \"Single-line HUD text\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` avoids the per-call wrapper work performed by `draw.DrawText` and `draw.SimpleTextOutlined`; use the direct surface state calls when no outline is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15231,"startedAt":"2026-07-11T07:34:37.718Z","completedAt":"2026-07-11T07:34:53.029Z","answerBytes":113,"answerChars":113,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":109,"totalTokens":16748,"reasoningTokens":64,"cachedTokens":16128},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: The length operator `#` is preferred for sequential array-like tables.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: The length operator `#` is preferred for sequential array-like tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15204,"startedAt":"2026-07-11T07:34:38.003Z","completedAt":"2026-07-11T07:34:53.212Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":217,"totalTokens":16863,"reasoningTokens":152,"cachedTokens":16128},"finalResponse":"```lua\nt = {}\n```\nReason: Replacing the table is generally faster because it avoids iterating over and niling every element; use `table.Empty(t)` only when existing references must observe the same table being emptied.","model_patch":"```lua\nt = {}\n```\nReason: Replacing the table is generally faster because it avoids iterating over and niling every element; use `table.Empty(t)` only when existing references must observe the same table being emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15021,"startedAt":"2026-07-11T07:34:40.544Z","completedAt":"2026-07-11T07:34:55.567Z","answerBytes":296,"answerChars":296,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":304,"totalTokens":16950,"reasoningTokens":195,"cachedTokens":16128},"finalResponse":"```lua\nlocal allowedWeapons = {\n    pistol = true,\n    smg1 = true,\n    shotgun = true,\n}\n\nlocal weapon = \"smg1\"\nif allowedWeapons[weapon] then\n    print(\"Allowed\")\nend\n```\nReason: Set lookup uses direct table-key access with average O(1) time, while `table.HasValue` scans the list in O(n) time.","model_patch":"```lua\nlocal allowedWeapons = {\n    pistol = true,\n    smg1 = true,\n    shotgun = true,\n}\n\nlocal weapon = \"smg1\"\nif allowedWeapons[weapon] then\n    print(\"Allowed\")\nend\n```\nReason: Set lookup uses direct table-key access with average O(1) time, while `table.HasValue` scans the list in O(n) time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15369,"startedAt":"2026-07-11T07:34:40.610Z","completedAt":"2026-07-11T07:34:55.982Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":302,"totalTokens":16949,"reasoningTokens":234,"cachedTokens":16128},"finalResponse":"```lua\nlocal playerData = {\n    name = \"iyda\",\n    score = 0,\n    alive = true,\n}\n```\nReason: The constructor initializes known fields during table creation, avoiding separate field-write operations.","model_patch":"```lua\nlocal playerData = {\n    name = \"iyda\",\n    score = 0,\n    alive = true,\n}\n```\nReason: The constructor initializes known fields during table creation, avoiding separate field-write operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12668,"startedAt":"2026-07-11T07:34:40.642Z","completedAt":"2026-07-11T07:34:53.314Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":143,"totalTokens":16782,"reasoningTokens":90,"cachedTokens":16128},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables use integer indices, so direct indexing avoids table.Random's key enumeration overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: Sequential tables use integer indices, so direct indexing avoids table.Random's key enumeration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13087,"startedAt":"2026-07-11T07:34:41.056Z","completedAt":"2026-07-11T07:34:54.157Z","answerBytes":120,"answerChars":120,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":119,"totalTokens":16761,"reasoningTokens":74,"cachedTokens":16128},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of a function call and exponentiation logic.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the overhead of a function call and exponentiation logic."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-luna@xhigh","model_name_or_path":"gpt-5.6-luna@xhigh","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":9193,"startedAt":"2026-07-11T07:34:41.339Z","completedAt":"2026-07-11T07:34:50.596Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":346,"totalTokens":16996,"reasoningTokens":290,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here\nend\n```\nReason: player.Iterator() efficiently visits every currently connected player without creating an intermediate table.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- Use ply here\nend\n```\nReason: player.Iterator() efficiently visits every currently connected player without creating an intermediate table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":33710,"startedAt":"2026-07-11T07:34:41.577Z","completedAt":"2026-07-11T07:35:15.288Z","answerBytes":249,"answerChars":249,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":1302,"totalTokens":17945,"reasoningTokens":1220,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if IsValid(ent) and ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: ents.Iterator() streams entities one at a time without first creating a table of every entity.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if IsValid(ent) and ent:GetClass() == \"prop_physics\" then\n        -- Process ent here.\n    end\nend\n```\nReason: ents.Iterator() streams entities one at a time without first creating a table of every entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":13279,"startedAt":"2026-07-11T07:34:41.659Z","completedAt":"2026-07-11T07:34:54.958Z","answerBytes":161,"answerChars":161,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":194,"totalTokens":16841,"reasoningTokens":130,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback on the `Think` hook under the `MyAddon.Think` identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the callback on the `Think` hook under the `MyAddon.Think` identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":14169,"startedAt":"2026-07-11T07:34:41.797Z","completedAt":"2026-07-11T07:34:55.982Z","answerBytes":140,"answerChars":140,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":194,"totalTokens":16836,"reasoningTokens":137,"cachedTokens":16128},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` rejects nil, NULL, and removed entities before method calls.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` rejects nil, NULL, and removed entities before method calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13984,"startedAt":"2026-07-11T07:34:44.320Z","completedAt":"2026-07-11T07:34:58.305Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16635,"completionTokens":222,"totalTokens":16857,"reasoningTokens":161,"cachedTokens":16128},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(length, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":28291,"startedAt":"2026-07-11T07:34:44.712Z","completedAt":"2026-07-11T07:35:13.052Z","answerBytes":273,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":994,"totalTokens":17637,"reasoningTokens":910,"cachedTokens":16128},"finalResponse":"```lua\n-- Fresh zeroed Angle in the hot path:\nlocal a = angle_zero:Copy()\n\n-- Slower equivalent:\n-- local a = Angle()\n```\nReason: `angle_zero:Copy()` creates a fresh Angle from the engine-provided zero value without invoking the constructor’s default initialization path.","model_patch":"```lua\n-- Fresh zeroed Angle in the hot path:\nlocal a = angle_zero:Copy()\n\n-- Slower equivalent:\n-- local a = Angle()\n```\nReason: `angle_zero:Copy()` creates a fresh Angle from the engine-provided zero value without invoking the constructor’s default initialization path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15450,"startedAt":"2026-07-11T07:34:47.334Z","completedAt":"2026-07-11T07:35:02.880Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":268,"totalTokens":16914,"reasoningTokens":204,"cachedTokens":16128},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local flat variable avoids table traversal and global lookup, so it is fastest for frequent reads.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\nlocal color = addonColor\n```\nReason: A local flat variable avoids table traversal and global lookup, so it is fastest for frequent reads."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18074,"startedAt":"2026-07-11T07:34:47.490Z","completedAt":"2026-07-11T07:35:05.626Z","answerBytes":196,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":587,"totalTokens":17229,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred over ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` is DarkRP’s supported accessor for the player’s synchronized job name.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred over ply:GetNWString(\"job\")\n```\nReason: `getDarkRPVar(\"job\")` is DarkRP’s supported accessor for the player’s synchronized job name."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11890,"startedAt":"2026-07-11T07:34:48.344Z","completedAt":"2026-07-11T07:35:00.236Z","answerBytes":254,"answerChars":254,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":272,"totalTokens":16915,"reasoningTokens":192,"cachedTokens":16128},"finalResponse":"```lua\nlocal threshold = 100\n\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: `DistToSqr` avoids the unnecessary square-root calculation; compare it with the threshold squared.","model_patch":"```lua\nlocal threshold = 100\n\nif firstVector:DistToSqr(secondVector) <= threshold * threshold then\n    -- Vectors are within the threshold.\nend\n```\nReason: `DistToSqr` avoids the unnecessary square-root calculation; compare it with the threshold squared."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12991,"startedAt":"2026-07-11T07:34:48.796Z","completedAt":"2026-07-11T07:35:01.864Z","answerBytes":173,"answerChars":173,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":351,"totalTokens":16992,"reasoningTokens":294,"cachedTokens":16128},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here\nend\n```\nReason: ents.Iterator() visits every entity without allocating the full table returned by ents.GetAll().","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Process ent here\nend\n```\nReason: ents.Iterator() visits every entity without allocating the full table returned by ents.GetAll()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":46943,"startedAt":"2026-07-11T07:34:48.821Z","completedAt":"2026-07-11T07:35:35.822Z","answerBytes":472,"answerChars":472,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16660,"completionTokens":2215,"totalTokens":18875,"reasoningTokens":2070,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindNearbyEntities(ply, radius)\n    if not IsValid(ply) then\n        return {}\n    end\n\n    return ents.FindInSphere(ply:GetPos(), radius)\nend\n\nlocal nearby = FindNearbyEntities(ply, 256)\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    -- Handle ent here.\nend\n```\nReason: `ents.FindInSphere` is a native spatial-partition query with exact radial semantics, making it a practical fast choice for proximity checks without relying on PVS visibility.","model_patch":"```lua\nlocal function FindNearbyEntities(ply, radius)\n    if not IsValid(ply) then\n        return {}\n    end\n\n    return ents.FindInSphere(ply:GetPos(), radius)\nend\n\nlocal nearby = FindNearbyEntities(ply, 256)\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    -- Handle ent here.\nend\n```\nReason: `ents.FindInSphere` is a native spatial-partition query with exact radial semantics, making it a practical fast choice for proximity checks without relying on PVS visibility."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18646,"startedAt":"2026-07-11T07:34:49.193Z","completedAt":"2026-07-11T07:35:07.854Z","answerBytes":477,"answerChars":477,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":648,"totalTokens":17298,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersInRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearbyPlayers = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearbyPlayers[#nearbyPlayers + 1] = ply\n        end\n    end\n\n    return nearbyPlayers\nend\n```\nReason: Iterate only the player list and compare squared distances, avoiding the broader entity spatial search and square-root calculations.","model_patch":"```lua\nlocal function FindPlayersInRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local nearbyPlayers = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearbyPlayers[#nearbyPlayers + 1] = ply\n        end\n    end\n\n    return nearbyPlayers\nend\n```\nReason: Iterate only the player list and compare squared distances, avoiding the broader entity spatial search and square-root calculations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13608,"startedAt":"2026-07-11T07:34:49.288Z","completedAt":"2026-07-11T07:35:02.899Z","answerBytes":223,"answerChars":223,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16647,"completionTokens":330,"totalTokens":16977,"reasoningTokens":258,"cachedTokens":16128},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric for loop is generally faster for counting in Garry's Mod Lua/LuaJIT because its loop control is optimized and avoids explicit increment and comparison operations.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: A numeric for loop is generally faster for counting in Garry's Mod Lua/LuaJIT because its loop control is optimized and avoids explicit increment and comparison operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17031,"startedAt":"2026-07-11T07:34:50.482Z","completedAt":"2026-07-11T07:35:07.629Z","answerBytes":420,"answerChars":420,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16653,"completionTokens":642,"totalTokens":17295,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandlePlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook.Run's lookup and dispatch overhead for every player.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n\nhook.Add(\"CustomPlayerTick\", \"HandlePlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- Custom logic for ply\n    end\nend)\n```\nReason: One hook dispatch per tick avoids repeating hook.Run's lookup and dispatch overhead for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12527,"startedAt":"2026-07-11T07:34:50.604Z","completedAt":"2026-07-11T07:35:03.133Z","answerBytes":540,"answerChars":540,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":395,"totalTokens":17043,"reasoningTokens":213,"cachedTokens":16128},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"Status: \" .. (health > 0 and \"Alive\" or \"Dead\"), \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(\"Value: \" .. health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the player and health once per frame instead of calling `LocalPlayer():Health()` three times.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"Status: \" .. (health > 0 and \"Alive\" or \"Dead\"), \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(\"Value: \" .. health, \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: Cache the player and health once per frame instead of calling `LocalPlayer():Health()` three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20762,"startedAt":"2026-07-11T07:34:51.344Z","completedAt":"2026-07-11T07:35:12.173Z","answerBytes":304,"answerChars":304,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":621,"totalTokens":17259,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawSomething\", function()\n    surface.SetDrawColor(WHITE)\n    surface.DrawRect(10, 10, 100, 100)\nend)\n```\nReason: Create the Color object once outside the paint loop and reuse it, avoiding per-frame allocation and garbage collection.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawSomething\", function()\n    surface.SetDrawColor(WHITE)\n    surface.DrawRect(10, 10, 100, 100)\nend)\n```\nReason: Create the Color object once outside the paint loop and reuse it, avoiding per-frame allocation and garbage collection."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7055,"startedAt":"2026-07-11T07:34:52.807Z","completedAt":"2026-07-11T07:34:59.956Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":165,"totalTokens":16805,"reasoningTokens":85,"cachedTokens":16128},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\n    -- use value\nend\n```\nReason: Local lookups are faster than repeatedly resolving the global `math` table and its `sin` field inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    local value = sin(i)\n    -- use value\nend\n```\nReason: Local lookups are faster than repeatedly resolving the global `math` table and its `sin` field inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25466,"startedAt":"2026-07-11T07:34:53.212Z","completedAt":"2026-07-11T07:35:19.091Z","answerBytes":595,"answerChars":595,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":1201,"totalTokens":17842,"reasoningTokens":1034,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayer\n\nlocal function GetCachedLocalPlayer()\n    if not IsValid(cachedPlayer) then\n        cachedPlayer = LocalPlayer()\n    end\n\n    return cachedPlayer\nend\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetCachedLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply repeatedly instead of calling LocalPlayer() here.\n    if ply:Alive() then\n        -- hot-path logic\n    end\nend)\n```\nReason: Cache the player entity in an upvalue and refresh it only when invalid, replacing repeated LocalPlayer() lookups with a cheaper local reference.","model_patch":"```lua\nlocal cachedPlayer\n\nlocal function GetCachedLocalPlayer()\n    if not IsValid(cachedPlayer) then\n        cachedPlayer = LocalPlayer()\n    end\n\n    return cachedPlayer\nend\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetCachedLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply repeatedly instead of calling LocalPlayer() here.\n    if ply:Alive() then\n        -- hot-path logic\n    end\nend)\n```\nReason: Cache the player entity in an upvalue and refresh it only when invalid, replacing repeated LocalPlayer() lookups with a cheaper local reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":25490,"startedAt":"2026-07-11T07:34:53.380Z","completedAt":"2026-07-11T07:35:19.143Z","answerBytes":565,"answerChars":565,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16655,"completionTokens":1204,"totalTokens":17859,"reasoningTokens":1034,"cachedTokens":16128},"finalResponse":"```lua\nlocal LOOK_THRESHOLD = 0.8660254 -- cos(30 degrees)\n\nlocal function ArePlayersLookingAtEachOther(playerA, playerB)\n    local offset = playerB:EyePos() - playerA:EyePos()\n    if offset:LengthSqr() == 0 then return false end\n\n    local towardB = offset:GetNormalized()\n    local towardA = -towardB\n\n    return playerA:GetAimVector():Dot(towardB) >= LOOK_THRESHOLD\n       and playerB:GetAimVector():Dot(towardA) >= LOOK_THRESHOLD\nend\n```\nReason: Dot products compare aim directions against the normalized direction between players without the cost of math.acos.","model_patch":"```lua\nlocal LOOK_THRESHOLD = 0.8660254 -- cos(30 degrees)\n\nlocal function ArePlayersLookingAtEachOther(playerA, playerB)\n    local offset = playerB:EyePos() - playerA:EyePos()\n    if offset:LengthSqr() == 0 then return false end\n\n    local towardB = offset:GetNormalized()\n    local towardA = -towardB\n\n    return playerA:GetAimVector():Dot(towardB) >= LOOK_THRESHOLD\n       and playerB:GetAimVector():Dot(towardA) >= LOOK_THRESHOLD\nend\n```\nReason: Dot products compare aim directions against the normalized direction between players without the cost of math.acos."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13611,"startedAt":"2026-07-11T07:34:53.443Z","completedAt":"2026-07-11T07:35:07.278Z","answerBytes":190,"answerChars":190,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16651,"completionTokens":578,"totalTokens":17229,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: It is generally faster when `SomeHelper` is a local/directly bound function because `ply:SomeHelper()` adds a member lookup and implicit receiver argument.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: It is generally faster when `SomeHelper` is a local/directly bound function because `ply:SomeHelper()` adds a member lookup and implicit receiver argument."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13535,"startedAt":"2026-07-11T07:34:54.187Z","completedAt":"2026-07-11T07:35:07.853Z","answerBytes":166,"answerChars":160,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":579,"totalTokens":17221,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nMsgN(\"[debug] hot-path event\")\n```\nReason: `MsgN` is Garry’s Mod’s native console-output function and avoids the extra overhead of Lua’s `print` wrapper.","model_patch":"```lua\nMsgN(\"[debug] hot-path event\")\n```\nReason: `MsgN` is Garry’s Mod’s native console-output function and avoids the extra overhead of Lua’s `print` wrapper."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11940,"startedAt":"2026-07-11T07:34:54.994Z","completedAt":"2026-07-11T07:35:06.965Z","answerBytes":247,"answerChars":247,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16646,"completionTokens":499,"totalTokens":17145,"reasoningTokens":416,"cachedTokens":16128},"finalResponse":"```lua\nlocal count = #values\nlocal total = 0\n\nfor i = 1, count do\n    total = total + values[i]\nend\n```\nReason: Numeric `for` with a cached length avoids iterator and key-traversal overhead, making it typically fastest for dense sequential arrays.","model_patch":"```lua\nlocal count = #values\nlocal total = 0\n\nfor i = 1, count do\n    total = total + values[i]\nend\n```\nReason: Numeric `for` with a cached length avoids iterator and key-traversal overhead, making it typically fastest for dense sequential arrays."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24493,"startedAt":"2026-07-11T07:34:55.112Z","completedAt":"2026-07-11T07:35:19.609Z","answerBytes":534,"answerChars":534,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16664,"completionTokens":1203,"totalTokens":17867,"reasoningTokens":1034,"cachedTokens":16128},"finalResponse":"```lua\n-- Equivalent to fn.Map(function(ply) return ply:Nick() end,\n--     fn.Filter(function(ply) return IsValid(ply) and ply:Alive() end, player.GetAll()))\n\nlocal players = player.GetAll()\nlocal aliveNames = {}\nlocal nameCount = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() then\n        nameCount = nameCount + 1\n        aliveNames[nameCount] = ply:Nick()\n    end\nend\n```\nReason: One fused numeric loop avoids intermediate tables, iterator overhead, and per-item filter/map closure calls.","model_patch":"```lua\n-- Equivalent to fn.Map(function(ply) return ply:Nick() end,\n--     fn.Filter(function(ply) return IsValid(ply) and ply:Alive() end, player.GetAll()))\n\nlocal players = player.GetAll()\nlocal aliveNames = {}\nlocal nameCount = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() then\n        nameCount = nameCount + 1\n        aliveNames[nameCount] = ply:Nick()\n    end\nend\n```\nReason: One fused numeric loop avoids intermediate tables, iterator overhead, and per-item filter/map closure calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24987,"startedAt":"2026-07-11T07:34:55.630Z","completedAt":"2026-07-11T07:35:20.645Z","answerBytes":725,"answerChars":725,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16657,"completionTokens":1242,"totalTokens":17899,"reasoningTokens":1034,"cachedTokens":16128},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\n-- Seed once when this file loads, including players already connected.\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers_Add\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CachePlayers_Remove\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-player work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only once and the cache changes on join or leave, so each tick iterates the existing player set without rebuilding a list.","model_patch":"```lua\nlocal cachedPlayers = {}\n\n-- Seed once when this file loads, including players already connected.\nfor _, ply in ipairs(player.GetAll()) do\n    cachedPlayers[ply] = true\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers_Add\", function(ply)\n    cachedPlayers[ply] = true\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CachePlayers_Remove\", function(ply)\n    cachedPlayers[ply] = nil\nend)\n\nhook.Add(\"Think\", \"ProcessCachedPlayers\", function()\n    for ply in pairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- Per-player work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` runs only once and the cache changes on join or leave, so each tick iterates the existing player set without rebuilding a list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":33177,"startedAt":"2026-07-11T07:34:55.706Z","completedAt":"2026-07-11T07:35:28.890Z","answerBytes":443,"answerChars":443,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16644,"completionTokens":1686,"totalTokens":18330,"reasoningTokens":1552,"cachedTokens":16128},"finalResponse":"```lua\nlocal tempByPlayer = {}\n\nlocal function SetTemp(ply, value)\n    tempByPlayer[ply] = value\nend\n\nlocal function GetTemp(ply)\n    return tempByPlayer[ply]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempByPlayer\", function(ply)\n    tempByPlayer[ply] = nil\nend)\n```\nReason: A local side table uses a direct table lookup and avoids the entity userdata field lookup/metamethod path; explicit disconnect cleanup prevents stale player references.","model_patch":"```lua\nlocal tempByPlayer = {}\n\nlocal function SetTemp(ply, value)\n    tempByPlayer[ply] = value\nend\n\nlocal function GetTemp(ply)\n    return tempByPlayer[ply]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempByPlayer\", function(ply)\n    tempByPlayer[ply] = nil\nend)\n```\nReason: A local side table uses a direct table lookup and avoids the entity userdata field lookup/metamethod path; explicit disconnect cleanup prevents stale player references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14658,"startedAt":"2026-07-11T07:34:55.812Z","completedAt":"2026-07-11T07:35:10.473Z","answerBytes":333,"answerChars":333,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16649,"completionTokens":618,"totalTokens":17267,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\n-- Prefer a sequential number-indexed array for fixed collections.\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric arrays use Lua's array storage and direct integer indexing, avoiding hash lookups required by string-keyed maps.","model_patch":"```lua\n-- Prefer a sequential number-indexed array for fixed collections.\nlocal values = { \"alpha\", \"beta\", \"gamma\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential numeric arrays use Lua's array storage and direct integer indexing, avoiding hash lookups required by string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8501,"startedAt":"2026-07-11T07:34:55.988Z","completedAt":"2026-07-11T07:35:04.568Z","answerBytes":172,"answerChars":172,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":275,"totalTokens":16923,"reasoningTokens":207,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing channel numbers avoids per-call Color-object overhead in the hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Passing channel numbers avoids per-call Color-object overhead in the hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11359,"startedAt":"2026-07-11T07:34:55.993Z","completedAt":"2026-07-11T07:35:07.493Z","answerBytes":234,"answerChars":234,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16666,"completionTokens":471,"totalTokens":17137,"reasoningTokens":400,"cachedTokens":16128},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT points FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips and connection overhead, so it is typically lower latency for a single server.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT points FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: Local SQLite avoids network round trips and connection overhead, so it is typically lower latency for a single server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15779,"startedAt":"2026-07-11T07:34:56.520Z","completedAt":"2026-07-11T07:35:12.305Z","answerBytes":553,"answerChars":553,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":689,"totalTokens":17330,"reasoningTokens":516,"cachedTokens":16128},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is resolved once per player and reused, avoiding repeated engine calls while disconnect cleanup prevents stale entries.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path\nlocal steamID = CachedSteamID(ply)\n```\nReason: The SteamID is resolved once per player and reused, avoiding repeated engine calls while disconnect cleanup prevents stale entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":14515,"startedAt":"2026-07-11T07:34:57.481Z","completedAt":"2026-07-11T07:35:12.043Z","answerBytes":441,"answerChars":441,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16642,"completionTokens":637,"totalTokens":17279,"reasoningTokens":505,"cachedTokens":16128},"finalResponse":"```lua\n-- Slower: repeatedly reallocates and copies the growing string.\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: collect pieces, then join them once.\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\nlocal fast = table.concat(parts)\n```\nReason: table.concat avoids repeatedly copying the growing string, reducing large concatenations from quadratic behavior toward linear behavior.","model_patch":"```lua\n-- Slower: repeatedly reallocates and copies the growing string.\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: collect pieces, then join them once.\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\nlocal fast = table.concat(parts)\n```\nReason: table.concat avoids repeatedly copying the growing string, reducing large concatenations from quadratic behavior toward linear behavior."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11690,"startedAt":"2026-07-11T07:34:57.663Z","completedAt":"2026-07-11T07:35:09.355Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":339,"totalTokens":16987,"reasoningTokens":261,"cachedTokens":16128},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra zero-radius `draw.RoundedBox` wrapper overhead.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, avoiding the extra zero-radius `draw.RoundedBox` wrapper overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23786,"startedAt":"2026-07-11T07:34:58.317Z","completedAt":"2026-07-11T07:35:22.107Z","answerBytes":393,"answerChars":393,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16643,"completionTokens":1163,"totalTokens":17806,"reasoningTokens":1034,"cachedTokens":0},"finalResponse":"```lua\nlocal text = \"Single-line HUD text\"\nlocal font = \"Trebuchet24\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: Direct surface calls avoid the extra wrapper and repeated outline draws used by draw.DrawText and draw.SimpleTextOutlined.","model_patch":"```lua\nlocal text = \"Single-line HUD text\"\nlocal font = \"Trebuchet24\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(32, 32)\n    surface.DrawText(text)\nend)\n```\nReason: Direct surface calls avoid the extra wrapper and repeated outline draws used by draw.DrawText and draw.SimpleTextOutlined."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7711,"startedAt":"2026-07-11T07:34:59.285Z","completedAt":"2026-07-11T07:35:06.998Z","answerBytes":161,"answerChars":159,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16635,"completionTokens":268,"totalTokens":16903,"reasoningTokens":209,"cachedTokens":16128},"finalResponse":"```lua\nlocal length = #myTable\n```\nReason: For a sequential array-like table, Lua’s `#` length operator is the idiomatic choice; `table.Count` counts all keys.","model_patch":"```lua\nlocal length = #myTable\n```\nReason: For a sequential array-like table, Lua’s `#` length operator is the idiomatic choice; `table.Count` counts all keys."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10012,"startedAt":"2026-07-11T07:34:59.979Z","completedAt":"2026-07-11T07:35:10.071Z","answerBytes":195,"answerChars":195,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16640,"completionTokens":367,"totalTokens":17007,"reasoningTokens":301,"cachedTokens":0},"finalResponse":"```lua\nt = {}\n```\nReason: `t = {}` replaces the table in constant time, while `table.Empty(t)` traverses and clears every entry; use `table.Empty` only when existing references must remain valid.","model_patch":"```lua\nt = {}\n```\nReason: `t = {}` replaces the table in constant time, while `table.Empty(t)` traverses and clears every entry; use `table.Empty` only when existing references must remain valid."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9874,"startedAt":"2026-07-11T07:35:00.310Z","completedAt":"2026-07-11T07:35:10.257Z","answerBytes":251,"answerChars":251,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16648,"completionTokens":375,"totalTokens":17023,"reasoningTokens":288,"cachedTokens":16128},"finalResponse":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: Set-style tables use near-constant-time key lookup, while table.HasValue scans the list linearly.","model_patch":"```lua\nlocal allowed = {\n    apple = true,\n    banana = true,\n    cherry = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: Set-style tables use near-constant-time key lookup, while table.HasValue scans the list linearly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8860,"startedAt":"2026-07-11T07:35:01.866Z","completedAt":"2026-07-11T07:35:10.728Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16641,"completionTokens":315,"totalTokens":16956,"reasoningTokens":246,"cachedTokens":16128},"finalResponse":"```lua\nlocal playerData = {\n    name = \"iyda\",\n    score = 0,\n    alive = true,\n}\n```\nReason: A table constructor initializes known fields during creation, avoiding separate post-creation assignments.","model_patch":"```lua\nlocal playerData = {\n    name = \"iyda\",\n    score = 0,\n    alive = true,\n}\n```\nReason: A table constructor initializes known fields during creation, avoiding separate post-creation assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13395,"startedAt":"2026-07-11T07:35:02.952Z","completedAt":"2026-07-11T07:35:16.396Z","answerBytes":176,"answerChars":176,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16639,"completionTokens":583,"totalTokens":17222,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal items = { \"a\", \"b\", \"c\" }\nlocal randomItem = items[math.random(#items)]\n```\nReason: Direct indexing avoids the extra general-table handling used by `table.Random`.","model_patch":"```lua\nlocal items = { \"a\", \"b\", \"c\" }\nlocal randomItem = items[math.random(#items)]\n```\nReason: Direct indexing avoids the extra general-table handling used by `table.Random`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7628,"startedAt":"2026-07-11T07:35:02.963Z","completedAt":"2026-07-11T07:35:10.635Z","answerBytes":130,"answerChars":130,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16638,"completionTokens":244,"totalTokens":16882,"reasoningTokens":197,"cachedTokens":16128},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids exponentiation overhead and is the fastest clear form for squaring.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids exponentiation overhead and is the fastest clear form for squaring."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.6-luna@max","model_name_or_path":"gpt-5.6-luna@max","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":8656,"startedAt":"2026-07-11T07:35:03.134Z","completedAt":"2026-07-11T07:35:11.792Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16650,"completionTokens":307,"totalTokens":16957,"reasoningTokens":240,"cachedTokens":16128},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- Handle ply here\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and `ipairs` visits each player in the returned list.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- Handle ply here\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and `ipairs` visits each player in the returned list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6921,"startedAt":"2026-07-11T07:35:03.652Z","completedAt":"2026-07-11T07:35:10.635Z","answerBytes":242,"answerChars":242,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":150,"totalTokens":16985,"reasoningTokens":72,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Visit ent here.\n    end\nend\n```\nReason: ents.Iterator() streams entities without allocating the full map entity table that ents.GetAll() would build.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- Visit ent here.\n    end\nend\n```\nReason: ents.Iterator() streams entities without allocating the full map entity table that ents.GetAll() would build."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4955,"startedAt":"2026-07-11T07:35:04.600Z","completedAt":"2026-07-11T07:35:09.600Z","answerBytes":168,"answerChars":168,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":63,"totalTokens":16904,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the function on the `Think` hook under the unique identifier `MyAddon.Think`.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers the function on the `Think` hook under the unique identifier `MyAddon.Think`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":7599,"startedAt":"2026-07-11T07:35:04.988Z","completedAt":"2026-07-11T07:35:12.783Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":116,"totalTokens":16950,"reasoningTokens":51,"cachedTokens":16384},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` returns false for nil, NULL, removed, or otherwise invalid entity references before you call entity methods.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` returns false for nil, NULL, removed, or otherwise invalid entity references before you call entity methods."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9998,"startedAt":"2026-07-11T07:35:05.660Z","completedAt":"2026-07-11T07:35:15.841Z","answerBytes":209,"answerChars":209,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16831,"completionTokens":66,"totalTokens":16897,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming payload here.\nend)\n```\nReason: `net.Receive` registers a callback that runs when the named network message is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming payload here.\nend)\n```\nReason: `net.Receive` registers a callback that runs when the named network message is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16737,"startedAt":"2026-07-11T07:35:06.997Z","completedAt":"2026-07-11T07:35:23.894Z","answerBytes":359,"answerChars":359,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":580,"totalTokens":17415,"reasoningTokens":466,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = angle_zero -- built-in Angle(0, 0, 0); never mutate this\n\nlocal function freshZeroAngle()\n    return ZERO_ANGLE * 1 -- fresh Angle, faster than Angle(0, 0, 0) / Angle()\nend\n```\nReason: Copying the engine-provided zero angle through the Angle metatable is cheaper than repeatedly going through the Lua Angle constructor in a hot path.","model_patch":"```lua\nlocal ZERO_ANGLE = angle_zero -- built-in Angle(0, 0, 0); never mutate this\n\nlocal function freshZeroAngle()\n    return ZERO_ANGLE * 1 -- fresh Angle, faster than Angle(0, 0, 0) / Angle()\nend\n```\nReason: Copying the engine-provided zero angle through the Angle metatable is cheaper than repeatedly going through the Lua Angle constructor in a hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5621,"startedAt":"2026-07-11T07:35:07.124Z","completedAt":"2026-07-11T07:35:12.783Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":65,"totalTokens":16905,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal addonColor = Color(255, 255, 255)\n\nsurface.SetDrawColor(addonColor)\n```\nReason: A local variable is fastest for frequent reads because it avoids global lookup and nested table indexing.","model_patch":"```lua\nlocal addonColor = Color(255, 255, 255)\n\nsurface.SetDrawColor(addonColor)\n```\nReason: A local variable is fastest for frequent reads because it avoids global lookup and nested table indexing."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":5493,"startedAt":"2026-07-11T07:35:07.331Z","completedAt":"2026-07-11T07:35:12.850Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":81,"totalTokens":16915,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = team.GetName(ply:Team())\n```\nReason: DarkRP stores a player's job as their team, so `team.GetName(ply:Team())` reads the authoritative local team data and avoids slower networked-string lookup via `ply:GetNWString(\"job\")`.","model_patch":"```lua\nlocal jobName = team.GetName(ply:Team())\n```\nReason: DarkRP stores a player's job as their team, so `team.GetName(ply:Team())` reads the authoritative local team data and avoids slower networked-string lookup via `ply:GetNWString(\"job\")`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7488,"startedAt":"2026-07-11T07:35:07.497Z","completedAt":"2026-07-11T07:35:14.990Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":69,"totalTokens":16906,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif a:DistToSqr(b) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root used by distance calculation, so it is preferred for threshold checks.","model_patch":"```lua\nif a:DistToSqr(b) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root used by distance calculation, so it is preferred for threshold checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8232,"startedAt":"2026-07-11T07:35:07.852Z","completedAt":"2026-07-11T07:35:16.493Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":151,"totalTokens":16984,"reasoningTokens":76,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent here.\nend\n```\nReason: `ents.Iterator()` visits every entity without building the full `ents.GetAll()` table first, which is the wiki-recommended efficient path for simple full-entity iteration.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Use ent here.\nend\n```\nReason: `ents.Iterator()` visits every entity without building the full `ents.GetAll()` table first, which is the wiki-recommended efficient path for simple full-entity iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":7723,"startedAt":"2026-07-11T07:35:08.119Z","completedAt":"2026-07-11T07:35:17.316Z","answerBytes":354,"answerChars":354,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16856,"completionTokens":207,"totalTokens":17063,"reasoningTokens":91,"cachedTokens":0},"finalResponse":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a cheap built-in spatial query for radius checks around a player and is commonly faster than broad Lua-side filtering.","model_patch":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a cheap built-in spatial query for radius checks around a player and is commonly faster than broad Lua-side filtering."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8066,"startedAt":"2026-07-11T07:35:08.167Z","completedAt":"2026-07-11T07:35:17.112Z","answerBytes":492,"answerChars":492,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16846,"completionTokens":187,"totalTokens":17033,"reasoningTokens":44,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n    local count = 0\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            nearby[count] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating `player.GetAll()` checks only players and uses squared distance, avoiding the broader entity sphere query and the square root cost.","model_patch":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local nearby = {}\n    local count = 0\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            nearby[count] = ply\n        end\n    end\n\n    return nearby\nend\n```\nReason: Iterating `player.GetAll()` checks only players and uses squared distance, avoiding the broader entity sphere query and the square root cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":5367,"startedAt":"2026-07-11T07:35:10.188Z","completedAt":"2026-07-11T07:35:15.652Z","answerBytes":246,"answerChars":246,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":85,"totalTokens":16922,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a tight numeric `while` loop is generally faster than a numeric `for` loop because it avoids the extra generic loop control overhead in this runtime.","model_patch":"```lua\nlocal i = 1\nwhile i <= n do\n    -- work\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a tight numeric `while` loop is generally faster than a numeric `for` loop because it avoids the extra generic loop control overhead in this runtime."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6046,"startedAt":"2026-07-11T07:35:10.232Z","completedAt":"2026-07-11T07:35:16.467Z","answerBytes":390,"answerChars":390,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16849,"completionTokens":116,"totalTokens":16965,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nhook.Run(\"MyTickForPlayers\", player.GetAll())\n\nhook.Add(\"MyTickForPlayers\", \"MyAddon.ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom logic for ply\n    end\nend)\n```\nReason: `hook.Run` does dispatch and lookup work each call, so doing it once per tick and looping players inside the listener avoids repeated hook overhead.","model_patch":"```lua\nhook.Run(\"MyTickForPlayers\", player.GetAll())\n\nhook.Add(\"MyTickForPlayers\", \"MyAddon.ProcessPlayers\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom logic for ply\n    end\nend)\n```\nReason: `hook.Run` does dispatch and lookup work each call, so doing it once per tick and looping players inside the listener avoids repeated hook overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9991,"startedAt":"2026-07-11T07:35:10.254Z","completedAt":"2026-07-11T07:35:20.645Z","answerBytes":499,"answerChars":499,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":195,"totalTokens":17037,"reasoningTokens":19,"cachedTokens":16384},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 45, math.Clamp(health, 0, 100) * 2, 16, Color(220, 60, 60))\n    draw.SimpleText(health .. \"%\", \"DermaDefault\", 230, 43, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per HUDPaint frame so the three draw calls reuse the same value instead of doing repeated method lookups/calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local health = LocalPlayer():Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 45, math.Clamp(health, 0, 100) * 2, 16, Color(220, 60, 60))\n    draw.SimpleText(health .. \"%\", \"DermaDefault\", 230, 43, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per HUDPaint frame so the three draw calls reuse the same value instead of doing repeated method lookups/calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5475,"startedAt":"2026-07-11T07:35:10.420Z","completedAt":"2026-07-11T07:35:16.204Z","answerBytes":312,"answerChars":312,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16832,"completionTokens":104,"totalTokens":16936,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawThings\", function()\n    for _, item in ipairs(items) do\n        surface.SetDrawColor(white)\n        -- draw item here\n    end\nend)\n```\nReason: `Color(...)` allocates a table, so create the constant once outside the hot paint loop and reuse it.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"DrawThings\", function()\n    for _, item in ipairs(items) do\n        surface.SetDrawColor(white)\n        -- draw item here\n    end\nend)\n```\nReason: `Color(...)` allocates a table, so create the constant once outside the hot paint loop and reuse it."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5471,"startedAt":"2026-07-11T07:35:10.602Z","completedAt":"2026-07-11T07:35:16.205Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":95,"totalTokens":16929,"reasoningTokens":16,"cachedTokens":16384},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop; local variable access is faster in Lua.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop; local variable access is faster in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6720,"startedAt":"2026-07-11T07:35:10.727Z","completedAt":"2026-07-11T07:35:17.635Z","answerBytes":529,"answerChars":529,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":165,"totalTokens":17004,"reasoningTokens":8,"cachedTokens":16384},"finalResponse":"```lua\nlocal ply\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    ply = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply here instead of calling LocalPlayer() repeatedly.\n        local pos = ply:GetPos()\n    end\nend)\n```\nReason: Cache the local player once after it exists, then refresh only if it becomes invalid, avoiding repeated global LocalPlayer() lookups in hot client code.","model_patch":"```lua\nlocal ply\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    ply = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n    end\n\n    if IsValid(ply) then\n        -- Use ply here instead of calling LocalPlayer() repeatedly.\n        local pos = ply:GetPos()\n    end\nend)\n```\nReason: Cache the local player once after it exists, then refresh only if it becomes invalid, avoiding repeated global LocalPlayer() lookups in hot client code."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6625,"startedAt":"2026-07-11T07:35:10.728Z","completedAt":"2026-07-11T07:35:17.635Z","answerBytes":478,"answerChars":478,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16853,"completionTokens":168,"totalTokens":17021,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal function AreRoughlyLookingAtEachOther(plyA, plyB, minDot)\n    minDot = minDot or 0.7 -- higher = stricter, 0.7 is roughly within 45 degrees\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= minDot\n        and plyB:GetAimVector():Dot(bToA) >= minDot\nend\n```\nReason: Dot products avoid `math.acos`; comparing against a cosine threshold is cheaper and enough for a rough facing check.","model_patch":"```lua\nlocal function AreRoughlyLookingAtEachOther(plyA, plyB, minDot)\n    minDot = minDot or 0.7 -- higher = stricter, 0.7 is roughly within 45 degrees\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= minDot\n        and plyB:GetAimVector():Dot(bToA) >= minDot\nend\n```\nReason: Dot products avoid `math.acos`; comparing against a cosine threshold is cheaper and enough for a rough facing check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7898,"startedAt":"2026-07-11T07:35:10.832Z","completedAt":"2026-07-11T07:35:18.965Z","answerBytes":170,"answerChars":170,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16843,"completionTokens":157,"totalTokens":17000,"reasoningTokens":100,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Faster generally, because a local/plain helper call avoids the per-call method lookup and implicit self dispatch of `ply:SomeHelper()`.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Faster generally, because a local/plain helper call avoids the per-call method lookup and implicit self dispatch of `ply:SomeHelper()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8982,"startedAt":"2026-07-11T07:35:11.803Z","completedAt":"2026-07-11T07:35:20.788Z","answerBytes":128,"answerChars":128,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":138,"totalTokens":16972,"reasoningTokens":89,"cachedTokens":16384},"finalResponse":"```lua\nMsgN(\"debug: hot path reached\")\n```\nReason: MsgN writes directly to the console with less formatting overhead than print.","model_patch":"```lua\nMsgN(\"debug: hot path reached\")\n```\nReason: MsgN writes directly to the console with less formatting overhead than print."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7546,"startedAt":"2026-07-11T07:35:12.074Z","completedAt":"2026-07-11T07:35:19.942Z","answerBytes":264,"answerChars":264,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":77,"totalTokens":16919,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric for loop is typically fastest for large sequential array-like tables because it avoids the iterator overhead of pairs/ipairs and does direct integer index access.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric for loop is typically fastest for large sequential array-like tables because it avoids the iterator overhead of pairs/ipairs and does direct integer index access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7788,"startedAt":"2026-07-11T07:35:12.298Z","completedAt":"2026-07-11T07:35:20.368Z","answerBytes":485,"answerChars":485,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16852,"completionTokens":196,"totalTokens":17048,"reasoningTokens":34,"cachedTokens":0},"finalResponse":"```lua\nlocal out = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Alive() and ply:Team() == TEAM_CITIZEN then\n        n = n + 1\n        out[n] = {\n            ply = ply,\n            name = ply:Nick(),\n            money = ply:getDarkRPVar(\"money\") or 0,\n        }\n    end\nend\n\nreturn out\n```\nReason: One tight indexed loop avoids fn's chained closures, iterator dispatch, and intermediate filter/map tables while doing the same transform.","model_patch":"```lua\nlocal out = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Alive() and ply:Team() == TEAM_CITIZEN then\n        n = n + 1\n        out[n] = {\n            ply = ply,\n            name = ply:Nick(),\n            money = ply:getDarkRPVar(\"money\") or 0,\n        }\n    end\nend\n\nreturn out\n```\nReason: One tight indexed loop avoids fn's chained closures, iterator dispatch, and intermediate filter/map tables while doing the same transform."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9588,"startedAt":"2026-07-11T07:35:12.565Z","completedAt":"2026-07-11T07:35:22.463Z","answerBytes":669,"answerChars":669,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16855,"completionTokens":190,"totalTokens":17045,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayersOnJoin\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayersOnLeave\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list, so doing it only on join/leave removes that repeated per-tick work while numeric iteration avoids `ipairs` overhead.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayersOnJoin\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayersOnLeave\", function()\n    cachedPlayers = player.GetAll()\nend)\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Per-player tick work here.\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list, so doing it only on join/leave removes that repeated per-tick work while numeric iteration avoids `ipairs` overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7064,"startedAt":"2026-07-11T07:35:12.828Z","completedAt":"2026-07-11T07:35:20.201Z","answerBytes":422,"answerChars":422,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":131,"totalTokens":16969,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal tempByPlayer = {}\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempPlayerData\", function(ply)\n    tempByPlayer[ply] = nil\nend)\n\nlocal function SetTemp(ply, value)\n    tempByPlayer[ply] = value\nend\n\nlocal function GetTemp(ply)\n    return tempByPlayer[ply]\nend\n```\nReason: Reading from a local table avoids repeated entity metatable/index lookup overhead from `ply.someField`, so hot-path per-player reads are cheaper.","model_patch":"```lua\nlocal tempByPlayer = {}\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempPlayerData\", function(ply)\n    tempByPlayer[ply] = nil\nend)\n\nlocal function SetTemp(ply, value)\n    tempByPlayer[ply] = value\nend\n\nlocal function GetTemp(ply)\n    return tempByPlayer[ply]\nend\n```\nReason: Reading from a local table avoids repeated entity metatable/index lookup overhead from `ply.someField`, so hot-path per-player reads are cheaper."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11046,"startedAt":"2026-07-11T07:35:12.850Z","completedAt":"2026-07-11T07:35:24.127Z","answerBytes":319,"answerChars":319,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":110,"totalTokens":16951,"reasoningTokens":9,"cachedTokens":16384},"finalResponse":"```lua\nlocal values = { \"alpha\", \"bravo\", \"charlie\", \"delta\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because Lua can walk dense integer slots with simple numeric indexing instead of hash lookups.","model_patch":"```lua\nlocal values = { \"alpha\", \"bravo\", \"charlie\", \"delta\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because Lua can walk dense integer slots with simple numeric indexing instead of hash lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8382,"startedAt":"2026-07-11T07:35:13.046Z","completedAt":"2026-07-11T07:35:21.733Z","answerBytes":285,"answerChars":285,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":162,"totalTokens":17004,"reasoningTokens":49,"cachedTokens":16384},"finalResponse":"```lua\nlocal r, g, b, a = 255, 80, 40, 255\n\nhook.Add(\"HUDPaint\", \"HotDrawPath\", function()\n    surface.SetDrawColor(r, g, b, a)\n    surface.DrawRect(32, 32, 160, 24)\nend)\n```\nReason: Passing separate numeric channels avoids the Color table/object path and is faster in a hot draw loop.","model_patch":"```lua\nlocal r, g, b, a = 255, 80, 40, 255\n\nhook.Add(\"HUDPaint\", \"HotDrawPath\", function()\n    surface.SetDrawColor(r, g, b, a)\n    surface.DrawRect(32, 32, 160, 24)\nend)\n```\nReason: Passing separate numeric channels avoids the Color table/object path and is faster in a hot draw loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6416,"startedAt":"2026-07-11T07:35:13.295Z","completedAt":"2026-07-11T07:35:19.942Z","answerBytes":305,"answerChars":305,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16860,"completionTokens":115,"totalTokens":16975,"reasoningTokens":20,"cachedTokens":0},"finalResponse":"```lua\nlocal steamId = sql.SQLStr(ply:SteamID64())\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steam_id = \" .. steamId .. \" LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server for a single-server, no-sync workload.","model_patch":"```lua\nlocal steamId = sql.SQLStr(ply:SteamID64())\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steam_id = \" .. steamId .. \" LIMIT 1\")\n```\nReason: Local SQLite is typically lower latency because it avoids network round trips to a remote MySQL server for a single-server, no-sync workload."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8903,"startedAt":"2026-07-11T07:35:15.118Z","completedAt":"2026-07-11T07:35:24.349Z","answerBytes":530,"answerChars":530,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":183,"totalTokens":17016,"reasoningTokens":16,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n```\nReason: Caches the expensive method result per Player object, uses weak keys so stale players can be collected, and clears explicitly on disconnect.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n```\nReason: Caches the expensive method result per Player object, uses weak keys so stale players can be collected, and clears explicitly on disconnect."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12847,"startedAt":"2026-07-11T07:35:15.650Z","completedAt":"2026-07-11T07:35:28.559Z","answerBytes":276,"answerChars":276,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":98,"totalTokens":16932,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece \" .. i .. \"\\n\"\nend\n\nlocal result = table.concat(parts)\n```\nReason: `table.concat` builds the final string in one pass, while repeated `..` concatenation keeps copying the growing string over and over.","model_patch":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece \" .. i .. \"\\n\"\nend\n\nlocal result = table.concat(parts)\n```\nReason: `table.concat` builds the final string in one pass, while repeated `..` concatenation keeps copying the growing string over and over."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13493,"startedAt":"2026-07-11T07:35:15.677Z","completedAt":"2026-07-11T07:35:29.335Z","answerBytes":230,"answerChars":230,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":133,"totalTokens":16971,"reasoningTokens":51,"cachedTokens":16384},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws the plain rectangle directly, while `draw.RoundedBox(0, ...)` still goes through the rounded-box helper path before drawing.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws the plain rectangle directly, while `draw.RoundedBox(0, ...)` still goes through the rounded-box helper path before drawing."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13088,"startedAt":"2026-07-11T07:35:15.897Z","completedAt":"2026-07-11T07:35:29.062Z","answerBytes":337,"answerChars":337,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":112,"totalTokens":16951,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: `surface.SetTextPos` + `surface.DrawText` is the lower-level path for a single line and avoids the extra alignment, newline, outline, and helper work in `draw.DrawText` / `draw.SimpleTextOutlined`.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: `surface.SetTextPos` + `surface.DrawText` is the lower-level path for a single line and avoids the extra alignment, newline, outline, and helper work in `draw.DrawText` / `draw.SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9629,"startedAt":"2026-07-11T07:35:16.231Z","completedAt":"2026-07-11T07:35:25.984Z","answerBytes":149,"answerChars":149,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":54,"totalTokens":16887,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal len = #t\n```\nReason: The `#` length operator is the idiomatic and fastest way to get the length of a sequential array-like table in Lua.","model_patch":"```lua\nlocal len = #t\n```\nReason: The `#` length operator is the idiomatic and fastest way to get the length of a sequential array-like table in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15581,"startedAt":"2026-07-11T07:35:16.254Z","completedAt":"2026-07-11T07:35:31.978Z","answerBytes":217,"answerChars":217,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":170,"totalTokens":17008,"reasoningTokens":98,"cachedTokens":16384},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding drops the old large table in O(1) and lets GC reclaim it later; table.Empty(t) must walk and clear every entry, so use it only when other references must see the same table emptied.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding drops the old large table in O(1) and lets GC reclaim it later; table.Empty(t) must walk and clear every entry, so use it only when other references must see the same table emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13234,"startedAt":"2026-07-11T07:35:16.402Z","completedAt":"2026-07-11T07:35:29.637Z","answerBytes":277,"answerChars":277,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":98,"totalTokens":16934,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal allowed = {\n    weapon_pistol = true,\n    weapon_smg1 = true,\n    weapon_crowbar = true,\n}\n\nif allowed[className] then\n    -- value exists in the set\nend\n```\nReason: Direct table key lookup is O(1) average-case, while table.HasValue scans the list O(n) each check.","model_patch":"```lua\nlocal allowed = {\n    weapon_pistol = true,\n    weapon_smg1 = true,\n    weapon_crowbar = true,\n}\n\nif allowed[className] then\n    -- value exists in the set\nend\n```\nReason: Direct table key lookup is O(1) average-case, while table.HasValue scans the list O(n) each check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14919,"startedAt":"2026-07-11T07:35:16.487Z","completedAt":"2026-07-11T07:35:31.435Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":69,"totalTokens":16904,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: A table constructor fills known fields during creation, avoiding separate field assignment bytecode after `{}`.","model_patch":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: A table constructor fills known fields during creation, avoiding separate field assignment bytecode after `{}`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19091,"startedAt":"2026-07-11T07:35:16.504Z","completedAt":"2026-07-11T07:35:35.617Z","answerBytes":161,"answerChars":161,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16831,"completionTokens":51,"totalTokens":16882,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key iteration overhead.","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids table.Random's generic key iteration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13375,"startedAt":"2026-07-11T07:35:17.316Z","completedAt":"2026-07-11T07:35:30.858Z","answerBytes":152,"answerChars":152,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16828,"completionTokens":51,"totalTokens":16879,"reasoningTokens":0,"cachedTokens":16384},"finalResponse":"```lua\nlocal y = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator and is the preferred fast form for squaring in a tight loop.","model_patch":"```lua\nlocal y = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator and is the preferred fast form for squaring in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.5@low","model_name_or_path":"gpt-5.5@low","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":17044,"startedAt":"2026-07-11T07:35:17.473Z","completedAt":"2026-07-11T07:35:34.569Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":186,"totalTokens":17030,"reasoningTokens":126,"cachedTokens":16384},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` visits currently connected players without allocating the table returned by `player.GetAll()`.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` visits currently connected players without allocating the table returned by `player.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22090,"startedAt":"2026-07-11T07:35:17.700Z","completedAt":"2026-07-11T07:35:40.035Z","answerBytes":279,"answerChars":279,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":423,"totalTokens":17258,"reasoningTokens":336,"cachedTokens":16384},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent\n    end\nend\n```\nReason: ents.Iterator() streams entities without allocating the full ents.GetAll()/ents.FindByClass() result table, and the class check keeps only prop_physics.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent\n    end\nend\n```\nReason: ents.Iterator() streams entities without allocating the full ents.GetAll()/ents.FindByClass() result table, and the class check keeps only prop_physics."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":13280,"startedAt":"2026-07-11T07:35:17.718Z","completedAt":"2026-07-11T07:35:31.143Z","answerBytes":157,"answerChars":157,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":74,"totalTokens":16913,"reasoningTokens":16,"cachedTokens":16384},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a named callback on the Think hook using the unique identifier MyAddon.Think.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a named callback on the Think hook using the unique identifier MyAddon.Think."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":8300,"startedAt":"2026-07-11T07:35:19.010Z","completedAt":"2026-07-11T07:35:27.359Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":114,"totalTokens":16950,"reasoningTokens":45,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` checks that the entity reference is non-nil, not NULL, and still valid before you call entity methods on it.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` checks that the entity reference is non-nil, not NULL, and still valid before you call entity methods on it."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12963,"startedAt":"2026-07-11T07:35:19.193Z","completedAt":"2026-07-11T07:35:32.343Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16827,"completionTokens":131,"totalTokens":16958,"reasoningTokens":56,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named net message and runs it when `MyAddon.Sync` is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read and handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named net message and runs it when `MyAddon.Sync` is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":24613,"startedAt":"2026-07-11T07:35:19.283Z","completedAt":"2026-07-11T07:35:44.001Z","answerBytes":512,"answerChars":512,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":667,"totalTokens":17502,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\n-- Slow in a hot path: allocates a new Angle userdata every call.\nlocal function slow()\n    local ang = Angle(0, 0, 0)\n    return ang\nend\n\n-- Fast when the Angle is only scratch state for this path.\nlocal scratchAng = Angle(0, 0, 0)\n\nlocal function fast()\n    scratchAng:Zero()\n    return scratchAng\nend\n```\nReason: Reusing one scratch Angle and zeroing it avoids repeated Angle userdata allocation; only use this when callers will not store or mutate the returned reference beyond the hot-path operation.","model_patch":"```lua\n-- Slow in a hot path: allocates a new Angle userdata every call.\nlocal function slow()\n    local ang = Angle(0, 0, 0)\n    return ang\nend\n\n-- Fast when the Angle is only scratch state for this path.\nlocal scratchAng = Angle(0, 0, 0)\n\nlocal function fast()\n    scratchAng:Zero()\n    return scratchAng\nend\n```\nReason: Reusing one scratch Angle and zeroing it avoids repeated Angle userdata allocation; only use this when callers will not store or mutate the returned reference beyond the hot-path operation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12960,"startedAt":"2026-07-11T07:35:19.834Z","completedAt":"2026-07-11T07:35:33.298Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":129,"totalTokens":16969,"reasoningTokens":64,"cachedTokens":0},"finalResponse":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A flat local is fastest because it avoids global lookup and repeated nested table indexing on every read.","model_patch":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A flat local is fastest because it avoids global lookup and repeated nested table indexing on every read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15955,"startedAt":"2026-07-11T07:35:20.177Z","completedAt":"2026-07-11T07:35:36.385Z","answerBytes":282,"answerChars":282,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":186,"totalTokens":17022,"reasoningTokens":90,"cachedTokens":16384},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Instead of:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP owns and synchronizes player job state through DarkRPVars, so `getDarkRPVar(\"job\")` uses the framework API instead of relying on raw NWString storage details.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Instead of:\n-- local jobName = ply:GetNWString(\"job\")\n```\nReason: DarkRP owns and synchronizes player job state through DarkRPVars, so `getDarkRPVar(\"job\")` uses the framework API instead of relying on raw NWString storage details."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13546,"startedAt":"2026-07-11T07:35:20.200Z","completedAt":"2026-07-11T07:35:34.047Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":128,"totalTokens":16965,"reasoningTokens":47,"cachedTokens":0},"finalResponse":"```lua\nlocal maxDistance = 500\n\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root needed for real distance, so it is preferred for threshold checks.","model_patch":"```lua\nlocal maxDistance = 500\n\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root needed for real distance, so it is preferred for threshold checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13775,"startedAt":"2026-07-11T07:35:20.337Z","completedAt":"2026-07-11T07:35:34.546Z","answerBytes":239,"answerChars":239,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":162,"totalTokens":16995,"reasoningTokens":88,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: `ents.Iterator()` visits all entities without building the `ents.GetAll()` table first, which is the wiki-recommended efficient path when you only need to iterate.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: `ents.Iterator()` visits all entities without building the `ents.GetAll()` table first, which is the wiki-recommended efficient path when you only need to iterate."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":13418,"startedAt":"2026-07-11T07:35:20.643Z","completedAt":"2026-07-11T07:35:34.195Z","answerBytes":368,"answerChars":368,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16852,"completionTokens":196,"totalTokens":17048,"reasoningTokens":78,"cachedTokens":0},"finalResponse":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a cheap built-in spatial query for entities near a point and is commonly faster than broader visibility-style searches for this job.","model_patch":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a cheap built-in spatial query for entities near a point and is commonly faster than broader visibility-style searches for this job."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14486,"startedAt":"2026-07-11T07:35:20.699Z","completedAt":"2026-07-11T07:35:35.267Z","answerBytes":513,"answerChars":513,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16846,"completionTokens":187,"totalTokens":17033,"reasoningTokens":40,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersInRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local found = {}\n    local count = 0\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            count = count + 1\n            found[count] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: Iterating `player.GetAll()` checks only players and uses squared distance, avoiding the broader entity sphere query, class filtering, and square-root cost.","model_patch":"```lua\nlocal function FindPlayersInRadius(origin, radius)\n    local radiusSqr = radius * radius\n    local found = {}\n    local count = 0\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(origin) <= radiusSqr then\n            count = count + 1\n            found[count] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: Iterating `player.GetAll()` checks only players and uses squared distance, avoiding the broader entity sphere query, class filtering, and square-root cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17005,"startedAt":"2026-07-11T07:35:20.713Z","completedAt":"2026-07-11T07:35:37.793Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":365,"totalTokens":17206,"reasoningTokens":287,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops are generally faster for tight 1-to-n counting because Lua handles the counter, limit, and increment in the loop opcode instead of doing explicit while-condition checks and increments in Lua.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops are generally faster for tight 1-to-n counting because Lua handles the counter, limit, and increment in the loop opcode instead of doing explicit while-condition checks and increments in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15057,"startedAt":"2026-07-11T07:35:20.794Z","completedAt":"2026-07-11T07:35:35.853Z","answerBytes":522,"answerChars":522,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16849,"completionTokens":198,"totalTokens":17047,"reasoningTokens":45,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n\n    -- Faster: one hook dispatch per tick; listeners loop only if they need to.\n    hook.Run(\"CustomLogicForPlayers\", players)\n\n    -- Slower: one hook dispatch per player per tick.\n    -- for _, ply in ipairs(players) do\n    --     hook.Run(\"CustomLogicForPlayer\", ply)\n    -- end\nend)\n```\nReason: `hook.Run` has dispatch overhead, so paying it once per tick and passing the player list is faster than paying it once per player.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n\n    -- Faster: one hook dispatch per tick; listeners loop only if they need to.\n    hook.Run(\"CustomLogicForPlayers\", players)\n\n    -- Slower: one hook dispatch per player per tick.\n    -- for _, ply in ipairs(players) do\n    --     hook.Run(\"CustomLogicForPlayer\", ply)\n    -- end\nend)\n```\nReason: `hook.Run` has dispatch overhead, so paying it once per tick and passing the player list is faster than paying it once per player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15047,"startedAt":"2026-07-11T07:35:21.824Z","completedAt":"2026-07-11T07:35:37.034Z","answerBytes":500,"answerChars":500,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":219,"totalTokens":17061,"reasoningTokens":40,"cachedTokens":16384},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHud\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(\"HP: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 45, math.max(health, 0) * 2, 16, Color(220, 60, 60))\n    draw.SimpleText(health .. \"%\", \"DermaDefault\", 20, 68, color_white)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once per frame so the three draw calls reuse local values instead of repeating method lookups/calls.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHud\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(\"HP: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 45, math.max(health, 0) * 2, 16, Color(220, 60, 60))\n    draw.SimpleText(health .. \"%\", \"DermaDefault\", 20, 68, color_white)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once per frame so the three draw calls reuse local values instead of repeating method lookups/calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15415,"startedAt":"2026-07-11T07:35:22.136Z","completedAt":"2026-07-11T07:35:37.677Z","answerBytes":331,"answerChars":331,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16830,"completionTokens":147,"totalTokens":16977,"reasoningTokens":36,"cachedTokens":16384},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintColor\", function()\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 100 do\n        -- draw work here\n    end\nend)\n```\nReason: Allocate the Color object once outside the paint loop and reuse it, avoiding per-frame/per-iteration table creation and GC pressure.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintColor\", function()\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 100 do\n        -- draw work here\n    end\nend)\n```\nReason: Allocate the Color object once outside the paint loop and reuse it, avoiding per-frame/per-iteration table creation and GC pressure."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13727,"startedAt":"2026-07-11T07:35:22.651Z","completedAt":"2026-07-11T07:35:36.638Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":94,"totalTokens":16928,"reasoningTokens":23,"cachedTokens":16384},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14795,"startedAt":"2026-07-11T07:35:23.966Z","completedAt":"2026-07-11T07:35:39.135Z","answerBytes":688,"answerChars":688,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":246,"totalTokens":17085,"reasoningTokens":55,"cachedTokens":0},"finalResponse":"```lua\nlocal cachedLocalPlayer\n\nlocal function LP()\n    if IsValid(cachedLocalPlayer) then\n        return cachedLocalPlayer\n    end\n\n    cachedLocalPlayer = LocalPlayer()\n    return cachedLocalPlayer\nend\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Hot path example:\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = LP()\n    if not IsValid(ply) then return end\n\n    -- use ply here instead of calling LocalPlayer() repeatedly\nend)\n``` \nReason: Cache the LocalPlayer entity after it exists, then reuse the local reference on hot paths while revalidating it so you avoid repeated global LocalPlayer() lookups.","model_patch":"```lua\nlocal cachedLocalPlayer\n\nlocal function LP()\n    if IsValid(cachedLocalPlayer) then\n        return cachedLocalPlayer\n    end\n\n    cachedLocalPlayer = LocalPlayer()\n    return cachedLocalPlayer\nend\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\n-- Hot path example:\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = LP()\n    if not IsValid(ply) then return end\n\n    -- use ply here instead of calling LocalPlayer() repeatedly\nend)\n``` \nReason: Cache the LocalPlayer entity after it exists, then reuse the local reference on hot paths while revalidating it so you avoid repeated global LocalPlayer() lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":17239,"startedAt":"2026-07-11T07:35:24.339Z","completedAt":"2026-07-11T07:35:41.899Z","answerBytes":594,"answerChars":594,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16851,"completionTokens":343,"totalTokens":17194,"reasoningTokens":139,"cachedTokens":0},"finalResponse":"```lua\nlocal LOOK_DOT = 0.75 -- about a 41 degree cone; raise for stricter checks\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aToB = b:EyePos() - a:EyePos()\n    local distSqr = aToB:LengthSqr()\n    if distSqr == 0 then return false end\n\n    aToB:Normalize()\n    local bToA = -aToB\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_DOT\n       and b:GetAimVector():Dot(bToA) >= LOOK_DOT\nend\n```\nReason: Dot products compare facing direction against a cosine threshold directly, avoiding `math.acos` and angle construction.","model_patch":"```lua\nlocal LOOK_DOT = 0.75 -- about a 41 degree cone; raise for stricter checks\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aToB = b:EyePos() - a:EyePos()\n    local distSqr = aToB:LengthSqr()\n    if distSqr == 0 then return false end\n\n    aToB:Normalize()\n    local bToA = -aToB\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_DOT\n       and b:GetAimVector():Dot(bToA) >= LOOK_DOT\nend\n```\nReason: Dot products compare facing direction against a cosine threshold directly, avoiding `math.acos` and angle construction."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18003,"startedAt":"2026-07-11T07:35:24.497Z","completedAt":"2026-07-11T07:35:42.784Z","answerBytes":166,"answerChars":166,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":138,"totalTokens":16979,"reasoningTokens":76,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Faster generally, because it avoids the `ply` method/metatable lookup that `ply:SomeHelper()` needs before passing `ply` as `self`.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Faster generally, because it avoids the `ply` method/metatable lookup that `ply:SomeHelper()` needs before passing `ply` as `self`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14575,"startedAt":"2026-07-11T07:35:24.530Z","completedAt":"2026-07-11T07:35:39.370Z","answerBytes":156,"answerChars":156,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":150,"totalTokens":16986,"reasoningTokens":92,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"debug: hot path reached\")\n```\nReason: `MsgN` writes directly to the console with a newline and avoids the extra formatting overhead of `print`.","model_patch":"```lua\nMsgN(\"debug: hot path reached\")\n```\nReason: `MsgN` writes directly to the console with a newline and avoids the extra formatting overhead of `print`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14581,"startedAt":"2026-07-11T07:35:25.987Z","completedAt":"2026-07-11T07:35:40.570Z","answerBytes":265,"answerChars":265,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":147,"totalTokens":16989,"reasoningTokens":59,"cachedTokens":16384},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric `for` over sequential integer keys avoids the iterator overhead of `pairs` and `ipairs`, so it is typically fastest for large array-like tables in Garry's Mod Lua.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: A numeric `for` over sequential integer keys avoids the iterator overhead of `pairs` and `ipairs`, so it is typically fastest for large array-like tables in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14272,"startedAt":"2026-07-11T07:35:27.379Z","completedAt":"2026-07-11T07:35:41.737Z","answerBytes":483,"answerChars":483,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16854,"completionTokens":202,"totalTokens":17056,"reasoningTokens":41,"cachedTokens":16384},"finalResponse":"```lua\nlocal out = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Alive() and ply:getDarkRPVar(\"job\") == TEAM_POLICE then\n        n = n + 1\n        out[n] = {\n            ent = ply,\n            name = ply:Nick(),\n            salary = ply:getDarkRPVar(\"salary\") or 0,\n        }\n    end\nend\n```\nReason: One fused numeric loop avoids fn's per-step closures, iterator dispatch, and intermediate tables while doing the same filter/map work.","model_patch":"```lua\nlocal out = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Alive() and ply:getDarkRPVar(\"job\") == TEAM_POLICE then\n        n = n + 1\n        out[n] = {\n            ent = ply,\n            name = ply:Nick(),\n            salary = ply:getDarkRPVar(\"salary\") or 0,\n        }\n    end\nend\n```\nReason: One fused numeric loop avoids fn's per-step closures, iterator dispatch, and intermediate tables while doing the same filter/map work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19970,"startedAt":"2026-07-11T07:35:28.647Z","completedAt":"2026-07-11T07:35:48.876Z","answerBytes":1304,"answerChars":1304,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16851,"completionTokens":496,"totalTokens":17347,"reasoningTokens":130,"cachedTokens":16384},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nlocal function AddCachedPlayer(ply)\n    if not IsValid(ply) or playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend\n\nlocal function RemoveCachedPlayer(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if lastPlayer ~= ply then\n        playerIndex[lastPlayer] = index\n    end\nend\n\nhook.Add(\"Initialize\", \"CacheExistingPlayers\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        AddCachedPlayer(ply)\n    end\nend)\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheJoinedPlayer\", AddCachedPlayer)\nhook.Add(\"PlayerDisconnected\", \"CacheLeftPlayer\", RemoveCachedPlayer)\n\nhook.Add(\"Tick\", \"FastPlayerTick\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` and `ipairs` are no longer run every tick; the hot path iterates one maintained array, while join/leave hooks pay the update cost only when membership changes.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nlocal function AddCachedPlayer(ply)\n    if not IsValid(ply) or playerIndex[ply] then return end\n\n    cachedPlayers[#cachedPlayers + 1] = ply\n    playerIndex[ply] = #cachedPlayers\nend\n\nlocal function RemoveCachedPlayer(ply)\n    local index = playerIndex[ply]\n    if not index then return end\n\n    local lastIndex = #cachedPlayers\n    local lastPlayer = cachedPlayers[lastIndex]\n\n    cachedPlayers[index] = lastPlayer\n    cachedPlayers[lastIndex] = nil\n    playerIndex[ply] = nil\n\n    if lastPlayer ~= ply then\n        playerIndex[lastPlayer] = index\n    end\nend\n\nhook.Add(\"Initialize\", \"CacheExistingPlayers\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        AddCachedPlayer(ply)\n    end\nend)\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheJoinedPlayer\", AddCachedPlayer)\nhook.Add(\"PlayerDisconnected\", \"CacheLeftPlayer\", RemoveCachedPlayer)\n\nhook.Add(\"Tick\", \"FastPlayerTick\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` and `ipairs` are no longer run every tick; the hot path iterates one maintained array, while join/leave hooks pay the update cost only when membership changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16375,"startedAt":"2026-07-11T07:35:28.897Z","completedAt":"2026-07-11T07:35:45.274Z","answerBytes":517,"answerChars":517,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":283,"totalTokens":17123,"reasoningTokens":118,"cachedTokens":0},"finalResponse":"```lua\nlocal playerTemp = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"InitTempData\", function(ply)\n    playerTemp[ply] = { score = 0 }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempData\", function(ply)\n    playerTemp[ply] = nil\nend)\n\nlocal function SetTempScore(ply, value)\n    playerTemp[ply].score = value\nend\n\nlocal function GetTempScore(ply)\n    return playerTemp[ply].score\nend\n```\nReason: A local Lua table keyed by `ply` avoids repeated entity/userdata field lookup overhead and keeps hot reads on plain table access.","model_patch":"```lua\nlocal playerTemp = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"InitTempData\", function(ply)\n    playerTemp[ply] = { score = 0 }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempData\", function(ply)\n    playerTemp[ply] = nil\nend)\n\nlocal function SetTempScore(ply, value)\n    playerTemp[ply].score = value\nend\n\nlocal function GetTempScore(ply)\n    return playerTemp[ply].score\nend\n```\nReason: A local Lua table keyed by `ply` avoids repeated entity/userdata field lookup overhead and keeps hot reads on plain table access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15205,"startedAt":"2026-07-11T07:35:29.108Z","completedAt":"2026-07-11T07:35:44.375Z","answerBytes":376,"answerChars":376,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":164,"totalTokens":17003,"reasoningTokens":56,"cachedTokens":16384},"finalResponse":"```lua\n-- Faster for fixed iteration: sequential number-indexed array\nlocal values = { \"health\", \"armor\", \"ammo\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays iterate faster than string-keyed maps because Lua can walk contiguous integer slots with a numeric for loop instead of hashing keys via pairs().","model_patch":"```lua\n-- Faster for fixed iteration: sequential number-indexed array\nlocal values = { \"health\", \"armor\", \"ammo\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays iterate faster than string-keyed maps because Lua can walk contiguous integer slots with a numeric for loop instead of hashing keys via pairs()."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17654,"startedAt":"2026-07-11T07:35:29.338Z","completedAt":"2026-07-11T07:35:46.994Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":136,"totalTokens":16980,"reasoningTokens":58,"cachedTokens":16384},"finalResponse":"```lua\n-- Hot draw path: pass raw channels, not a Color object.\nsurface.SetDrawColor(255, 80, 40, 255)\n```\nReason: Separate r, g, b, a numbers avoid Color object table lookup/allocation overhead in repeated draw calls.","model_patch":"```lua\n-- Hot draw path: pass raw channels, not a Color object.\nsurface.SetDrawColor(255, 80, 40, 255)\n```\nReason: Separate r, g, b, a numbers avoid Color object table lookup/allocation overhead in repeated draw calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13475,"startedAt":"2026-07-11T07:35:29.648Z","completedAt":"2026-07-11T07:35:43.136Z","answerBytes":358,"answerChars":358,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16860,"completionTokens":159,"totalTokens":17019,"reasoningTokens":53,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamId = sql.SQLStr(ply:SteamID64())\nlocal rows = sql.Query(\"SELECT money, rank FROM player_data WHERE steam_id = \" .. steamId .. \" LIMIT 1\")\n```\nReason: Local SQLite via Garry's Mod's `sql` library is typically lower latency for a single server because reads/writes avoid remote network round trips and multi-server coordination is not needed.","model_patch":"```lua\nlocal steamId = sql.SQLStr(ply:SteamID64())\nlocal rows = sql.Query(\"SELECT money, rank FROM player_data WHERE steam_id = \" .. steamId .. \" LIMIT 1\")\n```\nReason: Local SQLite via Garry's Mod's `sql` library is typically lower latency for a single server because reads/writes avoid remote network round trips and multi-server coordination is not needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15961,"startedAt":"2026-07-11T07:35:30.868Z","completedAt":"2026-07-11T07:35:46.846Z","answerBytes":637,"answerChars":637,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":333,"totalTokens":17168,"reasoningTokens":131,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path:\nfor _, ply in ipairs(player.GetAll()) do\n    local steamID = CachedSteamID(ply)\n    -- use steamID here\nend\n```\nReason: Cache by Player entity with weak keys so each player's SteamID is computed once, reused on the hot path, and cleared when the player leaves.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID == nil then\n        steamID = ply:SteamID()\n        steamIDCache[ply] = steamID\n    end\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path:\nfor _, ply in ipairs(player.GetAll()) do\n    local steamID = CachedSteamID(ply)\n    -- use steamID here\nend\n```\nReason: Cache by Player entity with weak keys so each player's SteamID is computed once, reused on the hot path, and cleared when the player leaves."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":7214,"startedAt":"2026-07-11T07:35:31.171Z","completedAt":"2026-07-11T07:35:38.387Z","answerBytes":401,"answerChars":401,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":185,"totalTokens":17021,"reasoningTokens":53,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: repeatedly reallocates and copies the growing string.\nlocal s = \"\"\nfor i = 1, #pieces do\n    s = s .. pieces[i]\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\n\nlocal result = table.concat(parts)\n```\nReason: table.concat builds the final string in one join step, avoiding repeated copying of an ever-growing string.","model_patch":"```lua\n-- Slower: repeatedly reallocates and copies the growing string.\nlocal s = \"\"\nfor i = 1, #pieces do\n    s = s .. pieces[i]\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\n\nlocal result = table.concat(parts)\n```\nReason: table.concat builds the final string in one join step, avoiding repeated copying of an ever-growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16797,"startedAt":"2026-07-11T07:35:31.461Z","completedAt":"2026-07-11T07:35:48.269Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":138,"totalTokens":16976,"reasoningTokens":66,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws the rectangle directly and avoids the extra `draw.RoundedBox` wrapper work when the radius is `0`.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws the rectangle directly and avoids the extra `draw.RoundedBox` wrapper work when the radius is `0`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15915,"startedAt":"2026-07-11T07:35:31.985Z","completedAt":"2026-07-11T07:35:47.904Z","answerBytes":618,"answerChars":618,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":287,"totalTokens":17124,"reasoningTokens":87,"cachedTokens":16384},"finalResponse":"```lua\nlocal text = \"Hello\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\nlocal color = Color(255, 255, 255)\n\nlocal setFont = surface.SetFont\nlocal setTextColor = surface.SetTextColor\nlocal setTextPos = surface.SetTextPos\nlocal drawText = surface.DrawText\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    setFont(font)\n    setTextColor(color)\n    setTextPos(x, y)\n    drawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` avoids the extra wrapper work in `draw.DrawText` and the much heavier repeated draws used by `draw.SimpleTextOutlined`.","model_patch":"```lua\nlocal text = \"Hello\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\nlocal color = Color(255, 255, 255)\n\nlocal setFont = surface.SetFont\nlocal setTextColor = surface.SetTextColor\nlocal setTextPos = surface.SetTextPos\nlocal drawText = surface.DrawText\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    setFont(font)\n    setTextColor(color)\n    setTextPos(x, y)\n    drawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` avoids the extra wrapper work in `draw.DrawText` and the much heavier repeated draws used by `draw.SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14299,"startedAt":"2026-07-11T07:35:32.350Z","completedAt":"2026-07-11T07:35:46.652Z","answerBytes":181,"answerChars":181,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16831,"completionTokens":107,"totalTokens":16938,"reasoningTokens":47,"cachedTokens":16384},"finalResponse":"```lua\nlocal count = #items\n```\nReason: `#` is the preferred length operator for sequential array-like tables; avoid `table.Count` unless you need to count non-sequential/hash keys.","model_patch":"```lua\nlocal count = #items\n```\nReason: `#` is the preferred length operator for sequential array-like tables; avoid `table.Count` unless you need to count non-sequential/hash keys."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15282,"startedAt":"2026-07-11T07:35:33.310Z","completedAt":"2026-07-11T07:35:48.603Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":155,"totalTokens":16995,"reasoningTokens":93,"cachedTokens":16384},"finalResponse":"```lua\nt = {}\n```\nReason: Replacing the table is generally faster because it avoids clearing every existing entry one by one; use table.Empty(t) only when other references must keep the same table object.","model_patch":"```lua\nt = {}\n```\nReason: Replacing the table is generally faster because it avoids clearing every existing entry one by one; use table.Empty(t) only when other references must keep the same table object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13448,"startedAt":"2026-07-11T07:35:34.055Z","completedAt":"2026-07-11T07:35:47.505Z","answerBytes":249,"answerChars":249,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":120,"totalTokens":16960,"reasoningTokens":28,"cachedTokens":16384},"finalResponse":"```lua\nlocal allowed = {\n    weapon_physgun = true,\n    weapon_crowbar = true,\n    weapon_pistol = true,\n}\n\nif allowed[className] then\n    -- value exists\nend\n```\nReason: A keyed table does O(1) hash lookup, while table.HasValue scans the list O(n).","model_patch":"```lua\nlocal allowed = {\n    weapon_physgun = true,\n    weapon_crowbar = true,\n    weapon_pistol = true,\n}\n\nif allowed[className] then\n    -- value exists\nend\n```\nReason: A keyed table does O(1) hash lookup, while table.HasValue scans the list O(n)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17839,"startedAt":"2026-07-11T07:35:34.200Z","completedAt":"2026-07-11T07:35:52.040Z","answerBytes":280,"answerChars":280,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":119,"totalTokens":16956,"reasoningTokens":34,"cachedTokens":16384},"finalResponse":"```lua\nlocal t = {\n    name = \"prop_physics\",\n    count = 3,\n    enabled = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and fills the table in one step instead of creating an empty table and then doing separate field assignments.","model_patch":"```lua\nlocal t = {\n    name = \"prop_physics\",\n    count = 3,\n    enabled = true,\n}\n```\nReason: Putting known fields in the table constructor is faster because Lua creates and fills the table in one step instead of creating an empty table and then doing separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12671,"startedAt":"2026-07-11T07:35:34.567Z","completedAt":"2026-07-11T07:35:47.316Z","answerBytes":160,"answerChars":160,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":107,"totalTokens":16940,"reasoningTokens":49,"cachedTokens":16384},"finalResponse":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids `table.Random` walking the table and is O(1).","model_patch":"```lua\nlocal value = items[math.random(#items)]\n```\nReason: For a sequential table, direct numeric indexing avoids `table.Random` walking the table and is O(1)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13689,"startedAt":"2026-07-11T07:35:34.632Z","completedAt":"2026-07-11T07:35:48.346Z","answerBytes":136,"answerChars":136,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16830,"completionTokens":104,"totalTokens":16934,"reasoningTokens":57,"cachedTokens":16384},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator/function overhead in a tight Lua loop.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator/function overhead in a tight Lua loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.5@medium","model_name_or_path":"gpt-5.5@medium","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":12951,"startedAt":"2026-07-11T07:35:35.269Z","completedAt":"2026-07-11T07:35:48.227Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":110,"totalTokens":16952,"reasoningTokens":48,"cachedTokens":0},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates the current connected player list without building the `player.GetAll()` table first.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates the current connected player list without building the `player.GetAll()` table first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15750,"startedAt":"2026-07-11T07:35:35.718Z","completedAt":"2026-07-11T07:35:51.554Z","answerBytes":238,"answerChars":238,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":301,"totalTokens":17136,"reasoningTokens":223,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent\n    end\nend\n```\nReason: `ents.Iterator()` walks entities lazily, so it avoids allocating a full entity table before filtering by class.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent\n    end\nend\n```\nReason: `ents.Iterator()` walks entities lazily, so it avoids allocating a full entity table before filtering by class."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":14684,"startedAt":"2026-07-11T07:35:35.852Z","completedAt":"2026-07-11T07:35:50.640Z","answerBytes":138,"answerChars":138,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":172,"totalTokens":17011,"reasoningTokens":117,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a named callback on the Think hook so it runs every frame.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: Registers a named callback on the Think hook so it runs every frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":13893,"startedAt":"2026-07-11T07:35:35.955Z","completedAt":"2026-07-11T07:35:49.855Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":151,"totalTokens":16987,"reasoningTokens":87,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` rejects nil/NULL/removed entities, so method calls only run on a usable entity reference.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` rejects nil/NULL/removed entities, so method calls only run on a usable entity reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14235,"startedAt":"2026-07-11T07:35:36.449Z","completedAt":"2026-07-11T07:35:50.874Z","answerBytes":205,"answerChars":205,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16827,"completionTokens":191,"totalTokens":17018,"reasoningTokens":121,"cachedTokens":16384},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback that runs when the `MyAddon.Sync` net message is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers a callback that runs when the `MyAddon.Sync` net message is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":24588,"startedAt":"2026-07-11T07:35:36.733Z","completedAt":"2026-07-11T07:36:01.666Z","answerBytes":338,"answerChars":338,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":622,"totalTokens":17463,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal zero = angle_zero\n\n-- Hot path: creates a new mutable Angle copied from the cached zero Angle.\nlocal function FreshZeroAngle()\n    return zero * 1\nend\n\n-- Slower in tight loops:\n-- local ang = Angle()\n```\nReason: `angle_zero * 1` copies the engine-provided zero Angle and avoids the slower Lua constructor path for `Angle()`.","model_patch":"```lua\nlocal zero = angle_zero\n\n-- Hot path: creates a new mutable Angle copied from the cached zero Angle.\nlocal function FreshZeroAngle()\n    return zero * 1\nend\n\n-- Slower in tight loops:\n-- local ang = Angle()\n```\nReason: `angle_zero * 1` copies the engine-provided zero Angle and avoids the slower Lua constructor path for `Angle()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15442,"startedAt":"2026-07-11T07:35:37.035Z","completedAt":"2026-07-11T07:35:52.479Z","answerBytes":179,"answerChars":179,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":235,"totalTokens":17077,"reasoningTokens":172,"cachedTokens":0},"finalResponse":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A flat local variable is fastest because it avoids repeated global and nested table lookups.","model_patch":"```lua\nlocal configColor = Color(255, 255, 255)\n\nlocal color = configColor\n```\nReason: A flat local variable is fastest because it avoids repeated global and nested table lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15766,"startedAt":"2026-07-11T07:35:37.699Z","completedAt":"2026-07-11T07:35:53.588Z","answerBytes":294,"answerChars":294,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":244,"totalTokens":17082,"reasoningTokens":149,"cachedTokens":16384},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred\n-- local jobName = ply:GetNWString(\"job\") -- avoid for DarkRP jobs\n```\nReason: DarkRP owns and syncs job data through DarkRPVars, so `getDarkRPVar(\"job\")` uses the framework contract instead of reading a raw networked string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred\n-- local jobName = ply:GetNWString(\"job\") -- avoid for DarkRP jobs\n```\nReason: DarkRP owns and syncs job data through DarkRPVars, so `getDarkRPVar(\"job\")` uses the framework contract instead of reading a raw networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5900,"startedAt":"2026-07-11T07:35:37.821Z","completedAt":"2026-07-11T07:35:43.866Z","answerBytes":234,"answerChars":234,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":168,"totalTokens":17007,"reasoningTokens":85,"cachedTokens":0},"finalResponse":"```lua\nlocal maxDistance = 250\n\nif pos1:DistToSqr(pos2) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root used for actual distance, so it is preferred for threshold checks.","model_patch":"```lua\nlocal maxDistance = 250\n\nif pos1:DistToSqr(pos2) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root used for actual distance, so it is preferred for threshold checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":23356,"startedAt":"2026-07-11T07:35:38.433Z","completedAt":"2026-07-11T07:36:01.799Z","answerBytes":332,"answerChars":332,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":618,"totalTokens":17451,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- visit ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- visit ent\n    end\nend\n```\nReason: `ents.Iterator()` avoids building the full `ents.GetAll()` table on newer Garry's Mod versions, while the fallback keeps older versions working.","model_patch":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- visit ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- visit ent\n    end\nend\n```\nReason: `ents.Iterator()` avoids building the full `ents.GetAll()` table on newer Garry's Mod versions, while the fallback keeps older versions working."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":11197,"startedAt":"2026-07-11T07:35:39.231Z","completedAt":"2026-07-11T07:35:50.442Z","answerBytes":670,"answerChars":670,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16852,"completionTokens":345,"totalTokens":17197,"reasoningTokens":146,"cachedTokens":0},"finalResponse":"```lua\nlocal radius = 512\nlocal radiusSqr = radius * radius\n\nlocal function FindEntitiesNearPlayer(ply)\n    local origin = ply:GetPos()\n    local mins = origin - Vector(radius, radius, radius)\n    local maxs = origin + Vector(radius, radius, radius)\n    local nearby = {}\n\n    for _, ent in ipairs(ents.FindInBox(mins, maxs)) do\n        if ent ~= ply and ent:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is a fast built-in broadphase query in common GMod benchmarks, and the squared-distance filter keeps the result circular without paying `FindInSphere` cost.","model_patch":"```lua\nlocal radius = 512\nlocal radiusSqr = radius * radius\n\nlocal function FindEntitiesNearPlayer(ply)\n    local origin = ply:GetPos()\n    local mins = origin - Vector(radius, radius, radius)\n    local maxs = origin + Vector(radius, radius, radius)\n    local nearby = {}\n\n    for _, ent in ipairs(ents.FindInBox(mins, maxs)) do\n        if ent ~= ply and ent:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is a fast built-in broadphase query in common GMod benchmarks, and the squared-distance filter keeps the result circular without paying `FindInSphere` cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20364,"startedAt":"2026-07-11T07:35:39.404Z","completedAt":"2026-07-11T07:35:59.783Z","answerBytes":455,"answerChars":455,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":483,"totalTokens":17327,"reasoningTokens":350,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local found = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            found[#found + 1] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: This scans only players and uses squared distance, avoiding the broad entity query, extra entity table, player filtering, and square-root distance cost.","model_patch":"```lua\nlocal function FindPlayersNear(pos, radius)\n    local radiusSqr = radius * radius\n    local found = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            found[#found + 1] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: This scans only players and uses squared distance, avoiding the broad entity query, extra entity table, player filtering, and square-root distance cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14018,"startedAt":"2026-07-11T07:35:40.058Z","completedAt":"2026-07-11T07:35:54.259Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":175,"totalTokens":17012,"reasoningTokens":103,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- tight loop body\nend\n```\nReason: Numeric `for` is generally faster because Lua handles the counter, limit, and step in optimized loop bytecode instead of repeated explicit condition/increment work.","model_patch":"```lua\nfor i = 1, n do\n    -- tight loop body\nend\n```\nReason: Numeric `for` is generally faster because Lua handles the counter, limit, and step in optimized loop bytecode instead of repeated explicit condition/increment work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":19712,"startedAt":"2026-07-11T07:35:40.577Z","completedAt":"2026-07-11T07:36:00.301Z","answerBytes":694,"answerChars":694,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16849,"completionTokens":337,"totalTokens":17186,"reasoningTokens":138,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: dispatches the hook once per player every tick.\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyPerPlayerTick\", ply)\n    end\nend)\n\n-- Faster: one hook dispatch per tick; receivers loop the player list if needed.\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    hook.Run(\"MyPlayersTick\", player.GetAll())\nend)\n\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(players)\n    for _, ply in ipairs(players) do\n        -- custom per-player logic here\n    end\nend)\n```\nReason: `hook.Run` has dispatch overhead, so doing it once per tick and passing all players is cheaper than doing one hook dispatch per player.","model_patch":"```lua\n-- Slower: dispatches the hook once per player every tick.\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyPerPlayerTick\", ply)\n    end\nend)\n\n-- Faster: one hook dispatch per tick; receivers loop the player list if needed.\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    hook.Run(\"MyPlayersTick\", player.GetAll())\nend)\n\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(players)\n    for _, ply in ipairs(players) do\n        -- custom per-player logic here\n    end\nend)\n```\nReason: `hook.Run` has dispatch overhead, so doing it once per tick and passing all players is cheaper than doing one hook dispatch per player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15697,"startedAt":"2026-07-11T07:35:41.815Z","completedAt":"2026-07-11T07:35:57.586Z","answerBytes":463,"answerChars":463,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":238,"totalTokens":17082,"reasoningTokens":72,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHud\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"HP: \" .. health, \"DermaDefault\", 20, 40, color_white)\n    draw.RoundedBox(4, 20, 60, health * 2, 12, Color(220, 60, 60))\nend)\n```\nReason: LocalPlayer() and Health() are resolved once per HUDPaint frame instead of repeating the same Lua/C++ calls three times.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealthHud\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(\"HP: \" .. health, \"DermaDefault\", 20, 40, color_white)\n    draw.RoundedBox(4, 20, 60, health * 2, 12, Color(220, 60, 60))\nend)\n```\nReason: LocalPlayer() and Health() are resolved once per HUDPaint frame instead of repeating the same Lua/C++ calls three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13882,"startedAt":"2026-07-11T07:35:41.908Z","completedAt":"2026-07-11T07:35:55.808Z","answerBytes":327,"answerChars":327,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16830,"completionTokens":225,"totalTokens":17055,"reasoningTokens":108,"cachedTokens":0},"finalResponse":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    for i = 1, 100 do\n        draw.SimpleText(\"Label\", \"DermaDefault\", 16, i * 14, COLOR_WHITE)\n    end\nend)\n```\nReason: Build the Color table once and reuse it, avoiding per-frame per-iteration allocations in the paint hot path.","model_patch":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    for i = 1, 100 do\n        draw.SimpleText(\"Label\", \"DermaDefault\", 16, i * 14, COLOR_WHITE)\n    end\nend)\n```\nReason: Build the Color table once and reuse it, avoiding per-frame per-iteration allocations in the paint hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12867,"startedAt":"2026-07-11T07:35:42.785Z","completedAt":"2026-07-11T07:35:55.655Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16832,"completionTokens":135,"totalTokens":16967,"reasoningTokens":62,"cachedTokens":16384},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    values[i] = sin(i * step)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, count do\n    values[i] = sin(i * step)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15746,"startedAt":"2026-07-11T07:35:43.148Z","completedAt":"2026-07-11T07:35:58.934Z","answerBytes":529,"answerChars":529,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":244,"totalTokens":17081,"reasoningTokens":95,"cachedTokens":16384},"finalResponse":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n\n    return cachedLocalPlayer\nend\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply here instead of calling LocalPlayer() repeatedly.\nend)\n```\nReason: Cache the player entity and only refresh it when it becomes invalid, avoiding repeated global LocalPlayer() lookups in hot code.","model_patch":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n\n    return cachedLocalPlayer\nend\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply here instead of calling LocalPlayer() repeatedly.\nend)\n```\nReason: Cache the player entity and only refresh it when it becomes invalid, avoiding repeated global LocalPlayer() lookups in hot code."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":23351,"startedAt":"2026-07-11T07:35:43.871Z","completedAt":"2026-07-11T07:36:07.247Z","answerBytes":585,"answerChars":585,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16851,"completionTokens":708,"totalTokens":17559,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal LOOK_COS = math.cos(math.rad(25)) -- smaller angle = stricter check\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aToB = b:EyePos() - a:EyePos()\n    local distSqr = aToB:LengthSqr()\n    if distSqr == 0 then return false end\n\n    aToB:Normalize()\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_COS\n       and b:GetAimVector():Dot(-aToB) >= LOOK_COS\nend\n```\nReason: Dot products compare normalized directions against a precomputed cosine threshold, avoiding expensive `math.acos` angle calculations.","model_patch":"```lua\nlocal LOOK_COS = math.cos(math.rad(25)) -- smaller angle = stricter check\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aToB = b:EyePos() - a:EyePos()\n    local distSqr = aToB:LengthSqr()\n    if distSqr == 0 then return false end\n\n    aToB:Normalize()\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_COS\n       and b:GetAimVector():Dot(-aToB) >= LOOK_COS\nend\n```\nReason: Dot products compare normalized directions against a precomputed cosine threshold, avoiding expensive `math.acos` angle calculations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16463,"startedAt":"2026-07-11T07:35:44.007Z","completedAt":"2026-07-11T07:36:00.472Z","answerBytes":280,"answerChars":280,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":309,"totalTokens":17150,"reasoningTokens":226,"cachedTokens":16384},"finalResponse":"```lua\nlocal function SomeHelper(ply)\n    -- helper body\nend\n\nSomeHelper(ply)\n```\nReason: Faster in general for controlled helpers because a local function call avoids the per-call method/table lookup behind `ply:SomeHelper()`; use colon when the helper belongs on the object API.","model_patch":"```lua\nlocal function SomeHelper(ply)\n    -- helper body\nend\n\nSomeHelper(ply)\n```\nReason: Faster in general for controlled helpers because a local function call avoids the per-call method/table lookup behind `ply:SomeHelper()`; use colon when the helper belongs on the object API."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":21125,"startedAt":"2026-07-11T07:35:44.376Z","completedAt":"2026-07-11T07:36:05.503Z","answerBytes":205,"answerChars":205,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":587,"totalTokens":17423,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal writeConsole = Msg\n\nwriteConsole(\"[debug] hot path reached\\n\")\n```\nReason: `Msg` is a lower-level console write than `print`, avoiding `print`'s extra argument formatting and newline handling.","model_patch":"```lua\nlocal writeConsole = Msg\n\nwriteConsole(\"[debug] hot path reached\\n\")\n```\nReason: `Msg` is a lower-level console write than `print`, avoiding `print`'s extra argument formatting and newline handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14987,"startedAt":"2026-07-11T07:35:45.287Z","completedAt":"2026-07-11T07:36:00.301Z","answerBytes":267,"answerChars":267,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":159,"totalTokens":17003,"reasoningTokens":75,"cachedTokens":16384},"finalResponse":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` is typically fastest for a large sequential array-like table because it avoids iterator function overhead from `pairs`/`ipairs` and does direct integer indexing.","model_patch":"```lua\nfor i = 1, #numbers do\n    local value = numbers[i]\n    -- use value\nend\n```\nReason: Numeric `for` is typically fastest for a large sequential array-like table because it avoids iterator function overhead from `pairs`/`ipairs` and does direct integer indexing."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":28116,"startedAt":"2026-07-11T07:35:46.653Z","completedAt":"2026-07-11T07:36:14.772Z","answerBytes":881,"answerChars":881,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16852,"completionTokens":765,"totalTokens":17617,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal IsValid = IsValid\nlocal teamGetName = team.GetName\n\nlocal function wantedRichPlayers(players, minMoney)\n    local out = {}\n    local outN = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply) and not ply:isArrested() and ply:getDarkRPVar(\"wanted\") then\n            local money = ply:getDarkRPVar(\"money\") or 0\n\n            if money >= minMoney then\n                outN = outN + 1\n                out[outN] = {\n                    ply = ply,\n                    name = ply:Nick(),\n                    job = teamGetName(ply:Team()),\n                    money = money\n                }\n            end\n        end\n    end\n\n    return out\nend\n\nlocal rows = wantedRichPlayers(player.GetAll(), 10000)\n```\nReason: This fuses filter and map into one numeric loop, avoiding DarkRP fn closures, chained iterator calls, and intermediate tables.","model_patch":"```lua\nlocal IsValid = IsValid\nlocal teamGetName = team.GetName\n\nlocal function wantedRichPlayers(players, minMoney)\n    local out = {}\n    local outN = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply) and not ply:isArrested() and ply:getDarkRPVar(\"wanted\") then\n            local money = ply:getDarkRPVar(\"money\") or 0\n\n            if money >= minMoney then\n                outN = outN + 1\n                out[outN] = {\n                    ply = ply,\n                    name = ply:Nick(),\n                    job = teamGetName(ply:Team()),\n                    money = money\n                }\n            end\n        end\n    end\n\n    return out\nend\n\nlocal rows = wantedRichPlayers(player.GetAll(), 10000)\n```\nReason: This fuses filter and map into one numeric loop, avoiding DarkRP fn closures, chained iterator calls, and intermediate tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":23653,"startedAt":"2026-07-11T07:35:46.850Z","completedAt":"2026-07-11T07:36:10.514Z","answerBytes":855,"answerChars":855,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16855,"completionTokens":758,"totalTokens":17613,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal cachedPlayerCount = 0\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\n    cachedPlayerCount = #cachedPlayers\nend\n\nhook.Add(\"Initialize\", \"MyAddon_PlayerCache_Init\", RefreshPlayerCache)\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon_PlayerCache_Join\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyAddon_PlayerCache_Leave\", function()\n    timer.Simple(0, RefreshPlayerCache) -- wait until the leaving player is gone from player.GetAll()\nend)\n\nhook.Add(\"Think\", \"MyAddon_FastThink\", function()\n    for i = 1, cachedPlayerCount do\n        local ply = cachedPlayers[i]\n\n        -- per-player tick work here\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only on join/leave, while the hot Think path reuses the cached array with a numeric loop.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal cachedPlayerCount = 0\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\n    cachedPlayerCount = #cachedPlayers\nend\n\nhook.Add(\"Initialize\", \"MyAddon_PlayerCache_Init\", RefreshPlayerCache)\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon_PlayerCache_Join\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyAddon_PlayerCache_Leave\", function()\n    timer.Simple(0, RefreshPlayerCache) -- wait until the leaving player is gone from player.GetAll()\nend)\n\nhook.Add(\"Think\", \"MyAddon_FastThink\", function()\n    for i = 1, cachedPlayerCount do\n        local ply = cachedPlayers[i]\n\n        -- per-player tick work here\n    end\nend)\n```\nReason: `player.GetAll()` allocates/builds the player list only on join/leave, while the hot Think path reuses the cached array with a numeric loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22997,"startedAt":"2026-07-11T07:35:47.017Z","completedAt":"2026-07-11T07:36:10.056Z","answerBytes":426,"answerChars":426,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":645,"totalTokens":17483,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal staminaByPlayer = {}\n\nlocal function SetStamina(ply, stamina)\n    staminaByPlayer[ply] = stamina\nend\n\nlocal function GetStamina(ply)\n    return staminaByPlayer[ply]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempStamina\", function(ply)\n    staminaByPlayer[ply] = nil\nend)\n```\nReason: A plain Lua side table keyed by player avoids repeated entity field lookup overhead and keeps cleanup explicit for temporary data.","model_patch":"```lua\nlocal staminaByPlayer = {}\n\nlocal function SetStamina(ply, stamina)\n    staminaByPlayer[ply] = stamina\nend\n\nlocal function GetStamina(ply)\n    return staminaByPlayer[ply]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempStamina\", function(ply)\n    staminaByPlayer[ply] = nil\nend)\n```\nReason: A plain Lua side table keyed by player avoids repeated entity field lookup overhead and keeps cleanup explicit for temporary data."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13992,"startedAt":"2026-07-11T07:35:47.326Z","completedAt":"2026-07-11T07:36:01.355Z","answerBytes":312,"answerChars":312,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16843,"completionTokens":195,"totalTokens":17038,"reasoningTokens":91,"cachedTokens":16384},"finalResponse":"```lua\nlocal values = {\n    \"health\",\n    \"armor\",\n    \"ammo\",\n    \"position\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays iterate faster than string-keyed maps because numeric indexing with a simple `for` loop avoids hash-key traversal.","model_patch":"```lua\nlocal values = {\n    \"health\",\n    \"armor\",\n    \"ammo\",\n    \"position\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays iterate faster than string-keyed maps because numeric indexing with a simple `for` loop avoids hash-key traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14079,"startedAt":"2026-07-11T07:35:47.525Z","completedAt":"2026-07-11T07:36:01.666Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16846,"completionTokens":156,"totalTokens":17002,"reasoningTokens":97,"cachedTokens":16384},"finalResponse":"```lua\nsurface.SetDrawColor(255, 80, 40, 255)\n```\nReason: Passing numeric channels avoids the Color object/table path and is faster in a hot draw loop.","model_patch":"```lua\nsurface.SetDrawColor(255, 80, 40, 255)\n```\nReason: Passing numeric channels avoids the Color object/table path and is faster in a hot draw loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13741,"startedAt":"2026-07-11T07:35:47.973Z","completedAt":"2026-07-11T07:36:01.864Z","answerBytes":319,"answerChars":319,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16862,"completionTokens":319,"totalTokens":17181,"reasoningTokens":217,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal row = sql.QueryRow(\"SELECT money, rank FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n```\nReason: local SQLite avoids remote network round trips, so it is typically lower latency for a single Garry's Mod server with no multi-server sync need.","model_patch":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal row = sql.QueryRow(\"SELECT money, rank FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n```\nReason: local SQLite avoids remote network round trips, so it is typically lower latency for a single Garry's Mod server with no multi-server sync need."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15107,"startedAt":"2026-07-11T07:35:48.229Z","completedAt":"2026-07-11T07:36:03.338Z","answerBytes":578,"answerChars":578,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":309,"totalTokens":17142,"reasoningTokens":124,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function FastSteamID(ply)\n    local id = steamIdCache[ply]\n    if id ~= nil then return id end\n\n    id = ply:SteamID()\n    steamIdCache[ply] = id\n    return id\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearFastSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- hot path\nlocal id = FastSteamID(ply)\n```\nReason: `ply:SteamID()` crosses the Lua/C++ method boundary each call; caching once per player entity turns repeated hot-path lookups into a table read while clearing stale entries on disconnect.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function FastSteamID(ply)\n    local id = steamIdCache[ply]\n    if id ~= nil then return id end\n\n    id = ply:SteamID()\n    steamIdCache[ply] = id\n    return id\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearFastSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- hot path\nlocal id = FastSteamID(ply)\n```\nReason: `ply:SteamID()` crosses the Lua/C++ method boundary each call; caching once per player entity turns repeated hot-path lookups into a table read while clearing stale entries on disconnect."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":14339,"startedAt":"2026-07-11T07:35:48.276Z","completedAt":"2026-07-11T07:36:02.641Z","answerBytes":487,"answerChars":487,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":242,"totalTokens":17078,"reasoningTokens":82,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: reallocates/copies the growing string each iteration.\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. tostring(i) .. \",\"\nend\n\n-- Faster: collect pieces, then concatenate once.\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[#pieces + 1] = tostring(i)\n    pieces[#pieces + 1] = \",\"\nend\n\nlocal fastResult = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the entire growing string, so it scales much better for thousands of pieces.","model_patch":"```lua\n-- Slower: reallocates/copies the growing string each iteration.\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. tostring(i) .. \",\"\nend\n\n-- Faster: collect pieces, then concatenate once.\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[#pieces + 1] = tostring(i)\n    pieces[#pieces + 1] = \",\"\nend\n\nlocal fastResult = table.concat(pieces)\n```\nReason: `table.concat` avoids repeatedly copying the entire growing string, so it scales much better for thousands of pieces."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11575,"startedAt":"2026-07-11T07:35:48.353Z","completedAt":"2026-07-11T07:35:59.979Z","answerBytes":214,"answerChars":214,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":437,"totalTokens":17277,"reasoningTokens":361,"cachedTokens":16384},"finalResponse":"```lua\nsurface.SetDrawColor(col)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the `draw.RoundedBox` wrapper work; hoist `surface.SetDrawColor` when drawing many rectangles with the same color.","model_patch":"```lua\nsurface.SetDrawColor(col)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the `draw.RoundedBox` wrapper work; hoist `surface.SetDrawColor` when drawing many rectangles with the same color."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15077,"startedAt":"2026-07-11T07:35:48.634Z","completedAt":"2026-07-11T07:36:03.793Z","answerBytes":632,"answerChars":632,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16843,"completionTokens":326,"totalTokens":17169,"reasoningTokens":129,"cachedTokens":16384},"finalResponse":"```lua\nlocal text = \"Player ready\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\nlocal color = Color(255, 255, 255)\n\nsurface.SetFont(font)\nlocal textW, textH = surface.GetTextSize(text) -- cache if text/font do not change\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetTextPos` + `surface.DrawText` avoids the extra wrapping/alignment/outline work in `draw.DrawText` and `draw.SimpleTextOutlined`, and caching `GetTextSize` avoids per-frame measurement when the string is stable.","model_patch":"```lua\nlocal text = \"Player ready\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\nlocal color = Color(255, 255, 255)\n\nsurface.SetFont(font)\nlocal textW, textH = surface.GetTextSize(text) -- cache if text/font do not change\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetTextPos` + `surface.DrawText` avoids the extra wrapping/alignment/outline work in `draw.DrawText` and `draw.SimpleTextOutlined`, and caching `GetTextSize` avoids per-frame measurement when the string is stable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14067,"startedAt":"2026-07-11T07:35:48.984Z","completedAt":"2026-07-11T07:36:03.052Z","answerBytes":158,"answerChars":158,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16829,"completionTokens":147,"totalTokens":16976,"reasoningTokens":90,"cachedTokens":16384},"finalResponse":"```lua\nlocal count = #items\n```\nReason: `#` is the native length operator for sequential array-like tables; `table.Count` is for counting all keys in a table.","model_patch":"```lua\nlocal count = #items\n```\nReason: `#` is the native length operator for sequential array-like tables; `table.Count` is for counting all keys in a table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12068,"startedAt":"2026-07-11T07:35:49.896Z","completedAt":"2026-07-11T07:36:02.062Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":227,"totalTokens":17061,"reasoningTokens":160,"cachedTokens":16384},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding to a fresh table is generally faster for large tables because it avoids walking and niling every existing entry; use table.Empty(t) only when other references must keep seeing the same table.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding to a fresh table is generally faster for large tables because it avoids walking and niling every existing entry; use table.Empty(t) only when other references must keep seeing the same table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9510,"startedAt":"2026-07-11T07:35:50.493Z","completedAt":"2026-07-11T07:36:00.087Z","answerBytes":411,"answerChars":411,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":206,"totalTokens":17044,"reasoningTokens":63,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: scans the list every time\nlocal roles = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(roles, plyRole) then\n    -- allowed\nend\n\n-- Faster: set-style table with O(1) lookup\nlocal roleSet = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif roleSet[plyRole] then\n    -- allowed\nend\n```\nReason: `table.HasValue` linearly scans the list, while keyed lookup checks the set directly.","model_patch":"```lua\n-- Slower: scans the list every time\nlocal roles = { \"admin\", \"moderator\", \"vip\" }\nif table.HasValue(roles, plyRole) then\n    -- allowed\nend\n\n-- Faster: set-style table with O(1) lookup\nlocal roleSet = {\n    admin = true,\n    moderator = true,\n    vip = true,\n}\n\nif roleSet[plyRole] then\n    -- allowed\nend\n```\nReason: `table.HasValue` linearly scans the list, while keyed lookup checks the set directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9139,"startedAt":"2026-07-11T07:35:50.642Z","completedAt":"2026-07-11T07:35:59.784Z","answerBytes":258,"answerChars":258,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":175,"totalTokens":17010,"reasoningTokens":94,"cachedTokens":16384},"finalResponse":"```lua\nlocal t = {\n    x = 10,\n    y = 20,\n    name = \"crate\",\n}\n```\nReason: The table constructor is faster because Lua creates and initializes the known fields in one operation instead of creating an empty table and then running separate field assignments.","model_patch":"```lua\nlocal t = {\n    x = 10,\n    y = 20,\n    name = \"crate\",\n}\n```\nReason: The table constructor is faster because Lua creates and initializes the known fields in one operation instead of creating an empty table and then running separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":8874,"startedAt":"2026-07-11T07:35:50.884Z","completedAt":"2026-07-11T07:35:59.788Z","answerBytes":224,"answerChars":224,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":151,"totalTokens":16986,"reasoningTokens":76,"cachedTokens":16384},"finalResponse":"```lua\nlocal random = math.random\n\nlocal function FastRandomSequential(t)\n    return t[random(#t)]\nend\n```\nReason: For a sequential table, indexing with `math.random(#t)` avoids `table.Random`'s generic table traversal work.","model_patch":"```lua\nlocal random = math.random\n\nlocal function FastRandomSequential(t)\n    return t[random(#t)]\nend\n```\nReason: For a sequential table, indexing with `math.random(#t)` avoids `table.Random`'s generic table traversal work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5698,"startedAt":"2026-07-11T07:35:51.572Z","completedAt":"2026-07-11T07:35:57.352Z","answerBytes":157,"answerChars":157,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16830,"completionTokens":121,"totalTokens":16951,"reasoningTokens":69,"cachedTokens":16384},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator and is the preferred fast form for squaring in tight loops.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication avoids the slower exponentiation operator and is the preferred fast form for squaring in tight loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.5@high","model_name_or_path":"gpt-5.5@high","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":11799,"startedAt":"2026-07-11T07:35:52.102Z","completedAt":"2026-07-11T07:36:03.997Z","answerBytes":173,"answerChars":173,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":359,"totalTokens":17203,"reasoningTokens":301,"cachedTokens":16384},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: player.Iterator() visits the current connected players without creating the player.GetAll() table first.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: player.Iterator() visits the current connected players without creating the player.GetAll() table first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14916,"startedAt":"2026-07-11T07:35:52.500Z","completedAt":"2026-07-11T07:36:07.450Z","answerBytes":236,"answerChars":236,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":596,"totalTokens":17435,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent here\n    end\nend\n```\nReason: ents.Iterator() walks entities lazily, so it avoids ents.GetAll() building a full map-wide entity table.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent here\n    end\nend\n```\nReason: ents.Iterator() walks entities lazily, so it avoids ents.GetAll() building a full map-wide entity table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":7060,"startedAt":"2026-07-11T07:35:53.630Z","completedAt":"2026-07-11T07:36:00.840Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":214,"totalTokens":17055,"reasoningTokens":148,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function on the `Think` hook using `MyAddon.Think` as its unique identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function on the `Think` hook using `MyAddon.Think` as its unique identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":6271,"startedAt":"2026-07-11T07:35:54.340Z","completedAt":"2026-07-11T07:36:00.736Z","answerBytes":185,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16836,"completionTokens":183,"totalTokens":17019,"reasoningTokens":117,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` returns false for nil, NULL, or removed entities, so methods are only called on usable entity references.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` returns false for nil, NULL, or removed entities, so methods are only called on usable entity references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9084,"startedAt":"2026-07-11T07:35:55.674Z","completedAt":"2026-07-11T07:36:04.809Z","answerBytes":170,"answerChars":170,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16831,"completionTokens":306,"totalTokens":17137,"reasoningTokens":246,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read message data here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Read message data here.\nend)\n```\nReason: net.Receive registers a callback for the named incoming net message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16178,"startedAt":"2026-07-11T07:35:55.825Z","completedAt":"2026-07-11T07:36:12.054Z","answerBytes":385,"answerChars":385,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":628,"totalTokens":17465,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: faster than Angle() because it reuses the C-side zero constant\n-- and only allocates when you explicitly copy it.\nlocal function FreshZeroAngle()\n    return Angle(ZERO_ANGLE)\nend\n```\nReason: Constructing from a cached zero Angle avoids parsing/default construction work on each call while still returning a separate mutable Angle.","model_patch":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: faster than Angle() because it reuses the C-side zero constant\n-- and only allocates when you explicitly copy it.\nlocal function FreshZeroAngle()\n    return Angle(ZERO_ANGLE)\nend\n```\nReason: Constructing from a cached zero Angle avoids parsing/default construction work on each call while still returning a separate mutable Angle."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14000,"startedAt":"2026-07-11T07:35:57.375Z","completedAt":"2026-07-11T07:36:11.385Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":580,"totalTokens":17422,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal configColor = Color(255, 80, 80)\n\nlocal color = configColor\n```\nReason: A flat local is fastest because it avoids global lookup and repeated table indexing on every read.","model_patch":"```lua\nlocal configColor = Color(255, 80, 80)\n\nlocal color = configColor\n```\nReason: A flat local is fastest because it avoids global lookup and repeated table indexing on every read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14540,"startedAt":"2026-07-11T07:35:57.627Z","completedAt":"2026-07-11T07:36:12.229Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":586,"totalTokens":17424,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the player-visible job name in DarkRPVars; use `getDarkRPVar(\"job\")` instead of reading the raw NW string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the player-visible job name in DarkRPVars; use `getDarkRPVar(\"job\")` instead of reading the raw NW string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10986,"startedAt":"2026-07-11T07:35:59.167Z","completedAt":"2026-07-11T07:36:10.692Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":340,"totalTokens":17177,"reasoningTokens":258,"cachedTokens":0},"finalResponse":"```lua\nlocal maxDistance = 500\n\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids calculating a square root, so it is preferred when you only need a threshold check.","model_patch":"```lua\nlocal maxDistance = 500\n\nif posA:DistToSqr(posB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids calculating a square root, so it is preferred when you only need a threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15032,"startedAt":"2026-07-11T07:35:59.789Z","completedAt":"2026-07-11T07:36:14.853Z","answerBytes":233,"answerChars":233,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":589,"totalTokens":17424,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient choice when you only need to iterate, because it avoids allocating the table returned by `ents.GetAll()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- Visit ent here.\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient choice when you only need to iterate, because it avoids allocating the table returned by `ents.GetAll()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":19554,"startedAt":"2026-07-11T07:35:59.790Z","completedAt":"2026-07-11T07:36:19.345Z","answerBytes":724,"answerChars":724,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16854,"completionTokens":742,"totalTokens":17596,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal RADIUS = 512\nlocal RADIUS_SQR = RADIUS * RADIUS\nlocal EXTENTS = Vector(RADIUS, RADIUS, RADIUS)\n\nlocal function FindEntitiesNearPlayer(ply)\n    if not IsValid(ply) then return {} end\n\n    local origin = ply:GetPos()\n    local candidates = ents.FindInBox(origin - EXTENTS, origin + EXTENTS)\n    local nearby = {}\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and ent:GetPos():DistToSqr(origin) <= RADIUS_SQR then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is commonly one of the faster built-in broad-phase queries; the `DistToSqr` filter keeps true radius behavior without a square root.","model_patch":"```lua\nlocal RADIUS = 512\nlocal RADIUS_SQR = RADIUS * RADIUS\nlocal EXTENTS = Vector(RADIUS, RADIUS, RADIUS)\n\nlocal function FindEntitiesNearPlayer(ply)\n    if not IsValid(ply) then return {} end\n\n    local origin = ply:GetPos()\n    local candidates = ents.FindInBox(origin - EXTENTS, origin + EXTENTS)\n    local nearby = {}\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and ent:GetPos():DistToSqr(origin) <= RADIUS_SQR then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is commonly one of the faster built-in broad-phase queries; the `DistToSqr` filter keeps true radius behavior without a square root."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15279,"startedAt":"2026-07-11T07:35:59.790Z","completedAt":"2026-07-11T07:36:15.332Z","answerBytes":546,"answerChars":546,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16846,"completionTokens":378,"totalTokens":17224,"reasoningTokens":218,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n    local found = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            found[count] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: This only iterates players and uses squared distance, avoiding `ents.FindInSphere` collecting nearby non-player entities and then filtering them.","model_patch":"```lua\nlocal function FindPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n    local found = {}\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            found[count] = ply\n        end\n    end\n\n    return found\nend\n```\nReason: This only iterates players and uses squared distance, avoiding `ents.FindInSphere` collecting nearby non-player entities and then filtering them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14533,"startedAt":"2026-07-11T07:36:00.269Z","completedAt":"2026-07-11T07:36:15.064Z","answerBytes":229,"answerChars":229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":591,"totalTokens":17430,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops are generally faster in GMod Lua because the VM/JIT has a dedicated numeric-for loop path, avoiding the extra manual compare and increment work of a while loop.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: Numeric for loops are generally faster in GMod Lua because the VM/JIT has a dedicated numeric-for loop path, avoiding the extra manual compare and increment work of a while loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19548,"startedAt":"2026-07-11T07:36:00.300Z","completedAt":"2026-07-11T07:36:20.246Z","answerBytes":817,"answerChars":817,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16849,"completionTokens":757,"totalTokens":17606,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, with the player list passed once.\nhook.Add(\"Tick\", \"MyAddon_TickPlayers_Fast\", function()\n    hook.Run(\"MyAddon_TickPlayers\", player.GetAll())\nend)\n\nhook.Add(\"MyAddon_TickPlayers\", \"MyAddon_CustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom per-player logic here\n    end\nend)\n\n-- Slower pattern to avoid: one hook dispatch per player per tick.\n-- hook.Add(\"Tick\", \"MyAddon_TickPlayers_Slow\", function()\n--     local players = player.GetAll()\n--     for i = 1, #players do\n--         hook.Run(\"MyAddon_TickPlayer\", players[i])\n--     end\n-- end)\n```\nReason: `hook.Run` has dispatch overhead, so doing it once per tick and looping players inside the listener avoids repeated hook lookup/callback dispatch per player.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, with the player list passed once.\nhook.Add(\"Tick\", \"MyAddon_TickPlayers_Fast\", function()\n    hook.Run(\"MyAddon_TickPlayers\", player.GetAll())\nend)\n\nhook.Add(\"MyAddon_TickPlayers\", \"MyAddon_CustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom per-player logic here\n    end\nend)\n\n-- Slower pattern to avoid: one hook dispatch per player per tick.\n-- hook.Add(\"Tick\", \"MyAddon_TickPlayers_Slow\", function()\n--     local players = player.GetAll()\n--     for i = 1, #players do\n--         hook.Run(\"MyAddon_TickPlayer\", players[i])\n--     end\n-- end)\n```\nReason: `hook.Run` has dispatch overhead, so doing it once per tick and looping players inside the listener avoids repeated hook lookup/callback dispatch per player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16828,"startedAt":"2026-07-11T07:36:00.433Z","completedAt":"2026-07-11T07:36:17.557Z","answerBytes":561,"answerChars":561,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16848,"completionTokens":718,"totalTokens":17566,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal healthBarColor = Color(220, 60, 60)\n\nhook.Add(\"HUDPaint\", \"DrawCachedHealth\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 42, math.Clamp(health, 0, 100) * 2, 12, healthBarColor)\n    draw.SimpleText(health > 0 and \"Alive\" or \"Dead\", \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: `LocalPlayer()` and `:Health()` run once per HUDPaint frame, then the cached `health` value is reused by all three draw calls.","model_patch":"```lua\nlocal healthBarColor = Color(220, 60, 60)\n\nhook.Add(\"HUDPaint\", \"DrawCachedHealth\", function()\n    local ply = LocalPlayer()\n    local health = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 20, 20, color_white)\n    draw.RoundedBox(4, 20, 42, math.Clamp(health, 0, 100) * 2, 12, healthBarColor)\n    draw.SimpleText(health > 0 and \"Alive\" or \"Dead\", \"DermaDefault\", 20, 60, color_white)\nend)\n```\nReason: `LocalPlayer()` and `:Health()` run once per HUDPaint frame, then the cached `health` value is reused by all three draw calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16269,"startedAt":"2026-07-11T07:36:00.471Z","completedAt":"2026-07-11T07:36:17.007Z","answerBytes":340,"answerChars":340,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16832,"completionTokens":626,"totalTokens":17458,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaint\", function()\n    for _, item in ipairs(items) do\n        draw.SimpleText(item.text, \"DermaDefault\", item.x, item.y, WHITE)\n    end\nend)\n```\nReason: Cache the Color table once outside the paint loop to avoid per-iteration table allocation and function call overhead.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaint\", function()\n    for _, item in ipairs(items) do\n        draw.SimpleText(item.text, \"DermaDefault\", item.x, item.y, WHITE)\n    end\nend)\n```\nReason: Cache the Color table once outside the paint loop to avoid per-iteration table allocation and function call overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14073,"startedAt":"2026-07-11T07:36:00.648Z","completedAt":"2026-07-11T07:36:14.925Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":598,"totalTokens":17432,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nlocal total = 0\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: `sin` is resolved once, so the hot loop uses a faster local lookup instead of repeatedly indexing `math.sin`.","model_patch":"```lua\nlocal sin = math.sin\n\nlocal total = 0\nfor i = 1, iterations do\n    total = total + sin(i)\nend\n```\nReason: `sin` is resolved once, so the hot loop uses a faster local lookup instead of repeatedly indexing `math.sin`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17535,"startedAt":"2026-07-11T07:36:00.839Z","completedAt":"2026-07-11T07:36:18.837Z","answerBytes":745,"answerChars":745,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":721,"totalTokens":17558,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal IsValid = IsValid\n\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n\n    return cachedLocalPlayer\nend\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply here instead of calling LocalPlayer() repeatedly\n    local pos = ply:GetPos()\nend)\n```\nReason: Cache the player entity once it exists and only refresh it when invalid, so hot paths reuse the same reference instead of repeatedly calling `LocalPlayer()`.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal IsValid = IsValid\n\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n\n    return cachedLocalPlayer\nend\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedLocalPlayer = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply here instead of calling LocalPlayer() repeatedly\n    local pos = ply:GetPos()\nend)\n```\nReason: Cache the player entity once it exists and only refresh it when invalid, so hot paths reuse the same reference instead of repeatedly calling `LocalPlayer()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16256,"startedAt":"2026-07-11T07:36:01.121Z","completedAt":"2026-07-11T07:36:17.618Z","answerBytes":566,"answerChars":566,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16849,"completionTokens":706,"totalTokens":17555,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal LOOK_DOT = 0.70 -- about a 45 degree cone; raise for stricter matching\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aEye = a:EyePos()\n    local bEye = b:EyePos()\n\n    local aToB = (bEye - aEye):GetNormalized()\n    local bToA = -aToB\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_DOT\n       and b:GetAimVector():Dot(bToA) >= LOOK_DOT\nend\n```\nReason: Dot products compare direction alignment against a cosine threshold directly, avoiding the slower `math.acos` angle conversion.","model_patch":"```lua\nlocal LOOK_DOT = 0.70 -- about a 45 degree cone; raise for stricter matching\n\nlocal function RoughlyLookingAtEachOther(a, b)\n    if not IsValid(a) or not IsValid(b) then return false end\n\n    local aEye = a:EyePos()\n    local bEye = b:EyePos()\n\n    local aToB = (bEye - aEye):GetNormalized()\n    local bToA = -aToB\n\n    return a:GetAimVector():Dot(aToB) >= LOOK_DOT\n       and b:GetAimVector():Dot(bToA) >= LOOK_DOT\nend\n```\nReason: Dot products compare direction alignment against a cosine threshold directly, avoiding the slower `math.acos` angle conversion."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8367,"startedAt":"2026-07-11T07:36:01.370Z","completedAt":"2026-07-11T07:36:09.738Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16843,"completionTokens":267,"totalTokens":17110,"reasoningTokens":184,"cachedTokens":0},"finalResponse":"```lua\nlocal function SomeHelper(ply)\n    -- ...\nend\n\nSomeHelper(ply)\n```\nReason: For a helper you control, a local function call with `ply` as an explicit argument avoids the method lookup behind `ply:SomeHelper()` and is generally faster in hot paths.","model_patch":"```lua\nlocal function SomeHelper(ply)\n    -- ...\nend\n\nSomeHelper(ply)\n```\nReason: For a helper you control, a local function call with `ply` as an explicit argument avoids the method lookup behind `ply:SomeHelper()` and is generally faster in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14436,"startedAt":"2026-07-11T07:36:01.827Z","completedAt":"2026-07-11T07:36:16.336Z","answerBytes":251,"answerChars":251,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":599,"totalTokens":17433,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal DEBUG_HOTPATH = false\nlocal msg = Msg\n\nif DEBUG_HOTPATH then\n    msg(\"[my_addon] hot path reached\\n\")\nend\n```\nReason: Msg writes the string directly with an explicit newline, avoiding print's extra argument conversion and formatting work.","model_patch":"```lua\nlocal DEBUG_HOTPATH = false\nlocal msg = Msg\n\nif DEBUG_HOTPATH then\n    msg(\"[my_addon] hot path reached\\n\")\nend\n```\nReason: Msg writes the string directly with an explicit newline, avoiding print's extra argument conversion and formatting work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14088,"startedAt":"2026-07-11T07:36:01.828Z","completedAt":"2026-07-11T07:36:16.082Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":590,"totalTokens":17434,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal nums = numbers\n\nfor i = 1, #nums do\n    local n = nums[i]\n    -- use n\nend\n```\nReason: numeric for avoids the generic iterator overhead of pairs/ipairs and is fastest for dense sequential arrays.","model_patch":"```lua\nlocal nums = numbers\n\nfor i = 1, #nums do\n    local n = nums[i]\n    -- use n\nend\n```\nReason: numeric for avoids the generic iterator overhead of pairs/ipairs and is fastest for dense sequential arrays."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17641,"startedAt":"2026-07-11T07:36:01.863Z","completedAt":"2026-07-11T07:36:19.640Z","answerBytes":631,"answerChars":631,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16856,"completionTokens":704,"totalTokens":17560,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal function richAliveNames(players, minMoney)\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply) and ply:Alive() then\n            local money = ply:getDarkRPVar(\"money\") or 0\n\n            if money >= minMoney then\n                n = n + 1\n                out[n] = ply:Nick()\n            end\n        end\n    end\n\n    return out\nend\n\nlocal names = richAliveNames(player.GetAll(), 10000)\n```\nReason: One fused numeric loop avoids DarkRP `fn` closure calls and intermediate filter/map tables, so it does less allocation and dispatch for the same transform.","model_patch":"```lua\nlocal function richAliveNames(players, minMoney)\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if IsValid(ply) and ply:Alive() then\n            local money = ply:getDarkRPVar(\"money\") or 0\n\n            if money >= minMoney then\n                n = n + 1\n                out[n] = ply:Nick()\n            end\n        end\n    end\n\n    return out\nend\n\nlocal names = richAliveNames(player.GetAll(), 10000)\n```\nReason: One fused numeric loop avoids DarkRP `fn` closure calls and intermediate filter/map tables, so it does less allocation and dispatch for the same transform."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19733,"startedAt":"2026-07-11T07:36:01.880Z","completedAt":"2026-07-11T07:36:21.876Z","answerBytes":1392,"answerChars":1392,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16855,"completionTokens":888,"totalTokens":17743,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nif SERVER then\n    local cachedPlayers = player.GetAll()\n    local cachedPlayerCount = #cachedPlayers\n    local cachedPlayerIndex = {}\n\n    for i = 1, cachedPlayerCount do\n        cachedPlayerIndex[cachedPlayers[i]] = i\n    end\n\n    hook.Add(\"PlayerInitialSpawn\", \"MyAddon_CachePlayer\", function(ply)\n        if cachedPlayerIndex[ply] then return end\n\n        cachedPlayerCount = cachedPlayerCount + 1\n        cachedPlayers[cachedPlayerCount] = ply\n        cachedPlayerIndex[ply] = cachedPlayerCount\n    end)\n\n    hook.Add(\"PlayerDisconnected\", \"MyAddon_UncachePlayer\", function(ply)\n        local index = cachedPlayerIndex[ply]\n        if not index then return end\n\n        local lastPlayer = cachedPlayers[cachedPlayerCount]\n        cachedPlayers[index] = lastPlayer\n        cachedPlayers[cachedPlayerCount] = nil\n        cachedPlayerIndex[ply] = nil\n\n        if lastPlayer ~= ply then\n            cachedPlayerIndex[lastPlayer] = index\n        end\n\n        cachedPlayerCount = cachedPlayerCount - 1\n    end)\n\n    hook.Add(\"Think\", \"MyAddon_PerPlayerThink\", function()\n        for i = 1, cachedPlayerCount do\n            local ply = cachedPlayers[i]\n\n            -- Per-player tick work here.\n        end\n    end)\nend\n```\nReason: `player.GetAll()` and `ipairs` are removed from the hot tick path; joins and leaves update the cache, while Think uses a numeric loop over a stable array.","model_patch":"```lua\nif SERVER then\n    local cachedPlayers = player.GetAll()\n    local cachedPlayerCount = #cachedPlayers\n    local cachedPlayerIndex = {}\n\n    for i = 1, cachedPlayerCount do\n        cachedPlayerIndex[cachedPlayers[i]] = i\n    end\n\n    hook.Add(\"PlayerInitialSpawn\", \"MyAddon_CachePlayer\", function(ply)\n        if cachedPlayerIndex[ply] then return end\n\n        cachedPlayerCount = cachedPlayerCount + 1\n        cachedPlayers[cachedPlayerCount] = ply\n        cachedPlayerIndex[ply] = cachedPlayerCount\n    end)\n\n    hook.Add(\"PlayerDisconnected\", \"MyAddon_UncachePlayer\", function(ply)\n        local index = cachedPlayerIndex[ply]\n        if not index then return end\n\n        local lastPlayer = cachedPlayers[cachedPlayerCount]\n        cachedPlayers[index] = lastPlayer\n        cachedPlayers[cachedPlayerCount] = nil\n        cachedPlayerIndex[ply] = nil\n\n        if lastPlayer ~= ply then\n            cachedPlayerIndex[lastPlayer] = index\n        end\n\n        cachedPlayerCount = cachedPlayerCount - 1\n    end)\n\n    hook.Add(\"Think\", \"MyAddon_PerPlayerThink\", function()\n        for i = 1, cachedPlayerCount do\n            local ply = cachedPlayers[i]\n\n            -- Per-player tick work here.\n        end\n    end)\nend\n```\nReason: `player.GetAll()` and `ipairs` are removed from the hot tick path; joins and leaves update the cache, while Think uses a numeric loop over a stable array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":16584,"startedAt":"2026-07-11T07:36:02.287Z","completedAt":"2026-07-11T07:36:19.080Z","answerBytes":462,"answerChars":462,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":661,"totalTokens":17499,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal scoreByEntIndex = {}\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempPlayerData\", function(ply)\n    scoreByEntIndex[ply:EntIndex()] = nil\nend)\n\nlocal function SetTempScore(ply, score)\n    scoreByEntIndex[ply:EntIndex()] = score\nend\n\nlocal function GetTempScore(ply)\n    return scoreByEntIndex[ply:EntIndex()]\nend\n```\nReason: Numeric side-table reads avoid repeated custom field lookup on the Player object and keep hot temporary data in a plain Lua table.","model_patch":"```lua\nlocal scoreByEntIndex = {}\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempPlayerData\", function(ply)\n    scoreByEntIndex[ply:EntIndex()] = nil\nend)\n\nlocal function SetTempScore(ply, score)\n    scoreByEntIndex[ply:EntIndex()] = score\nend\n\nlocal function GetTempScore(ply)\n    return scoreByEntIndex[ply:EntIndex()]\nend\n```\nReason: Numeric side-table reads avoid repeated custom field lookup on the Player object and keep hot temporary data in a plain Lua table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10502,"startedAt":"2026-07-11T07:36:02.739Z","completedAt":"2026-07-11T07:36:13.375Z","answerBytes":367,"answerChars":367,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16845,"completionTokens":375,"totalTokens":17220,"reasoningTokens":256,"cachedTokens":16384},"finalResponse":"```lua\nlocal classes = {\n    \"weapon_pistol\",\n    \"weapon_smg1\",\n    \"weapon_shotgun\",\n    \"weapon_ar2\",\n}\n\nfor i = 1, #classes do\n    local class = classes[i]\n    -- use class\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because Lua can walk the array part with direct numeric indexes instead of traversing hash keys.","model_patch":"```lua\nlocal classes = {\n    \"weapon_pistol\",\n    \"weapon_smg1\",\n    \"weapon_shotgun\",\n    \"weapon_ar2\",\n}\n\nfor i = 1, #classes do\n    local class = classes[i]\n    -- use class\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate than string-keyed maps because Lua can walk the array part with direct numeric indexes instead of traversing hash keys."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15117,"startedAt":"2026-07-11T07:36:03.067Z","completedAt":"2026-07-11T07:36:18.245Z","answerBytes":305,"answerChars":305,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16846,"completionTokens":635,"totalTokens":17481,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal drawR, drawG, drawB, drawA = 255, 80, 40, 255\n\nhook.Add(\"HUDPaint\", \"HotDrawPath\", function()\n    surface.SetDrawColor(drawR, drawG, drawB, drawA)\n    surface.DrawRect(32, 32, 160, 24)\nend)\n```\nReason: Passing raw numeric channels avoids the slower Color table/object path in a hot draw loop.","model_patch":"```lua\nlocal drawR, drawG, drawB, drawA = 255, 80, 40, 255\n\nhook.Add(\"HUDPaint\", \"HotDrawPath\", function()\n    surface.SetDrawColor(drawR, drawG, drawB, drawA)\n    surface.DrawRect(32, 32, 160, 24)\nend)\n```\nReason: Passing raw numeric channels avoids the slower Color table/object path in a hot draw loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10228,"startedAt":"2026-07-11T07:36:03.351Z","completedAt":"2026-07-11T07:36:13.590Z","answerBytes":382,"answerChars":382,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16866,"completionTokens":385,"totalTokens":17251,"reasoningTokens":267,"cachedTokens":16384},"finalResponse":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal rows = sql.Query(\"SELECT money FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n\nif rows and rows[1] then\n    print(rows[1].money)\nend\n```\nReason: Local SQLite is typically lower latency because it avoids remote MySQL network round trips and separate database-server overhead for a single-server data store.","model_patch":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal rows = sql.Query(\"SELECT money FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64) .. \" LIMIT 1\")\n\nif rows and rows[1] then\n    print(rows[1].money)\nend\n```\nReason: Local SQLite is typically lower latency because it avoids remote MySQL network round trips and separate database-server overhead for a single-server data store."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17689,"startedAt":"2026-07-11T07:36:03.916Z","completedAt":"2026-07-11T07:36:21.683Z","answerBytes":947,"answerChars":947,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16835,"completionTokens":797,"totalTokens":17632,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\nlocal isValid = IsValid\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID ~= nil then\n        return steamID\n    end\n\n    if not isValid(ply) then\n        return nil\n    end\n\n    steamID = ply:SteamID()\n    steamIDCache[ply] = steamID\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path: call once per player, then reuse the local string.\nlocal function ProcessPlayers(players)\n    for i = 1, #players do\n        local ply = players[i]\n        local steamID = CachedSteamID(ply)\n\n        if steamID ~= nil then\n            -- Use steamID here instead of calling ply:SteamID() again.\n        end\n    end\nend\n``` \nReason: Cache the immutable SteamID per Player entity, avoid repeated engine method calls in the hot loop, and clear entries when players disconnect.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\nlocal isValid = IsValid\n\nlocal function CachedSteamID(ply)\n    local steamID = steamIDCache[ply]\n    if steamID ~= nil then\n        return steamID\n    end\n\n    if not isValid(ply) then\n        return nil\n    end\n\n    steamID = ply:SteamID()\n    steamIDCache[ply] = steamID\n    return steamID\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- Hot path: call once per player, then reuse the local string.\nlocal function ProcessPlayers(players)\n    for i = 1, #players do\n        local ply = players[i]\n        local steamID = CachedSteamID(ply)\n\n        if steamID ~= nil then\n            -- Use steamID here instead of calling ply:SteamID() again.\n        end\n    end\nend\n``` \nReason: Cache the immutable SteamID per Player entity, avoid repeated engine method calls in the hot loop, and clear entries when players disconnect."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":16005,"startedAt":"2026-07-11T07:36:03.999Z","completedAt":"2026-07-11T07:36:20.008Z","answerBytes":429,"answerChars":429,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16838,"completionTokens":670,"totalTokens":17508,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: repeatedly copies the growing string.\nlocal slow = \"\"\nfor i = 1, 10000 do\n    slow = slow .. \"piece \" .. i .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece \" .. i .. \"\\n\"\nend\n\nlocal fast = table.concat(parts)\n```\nReason: `table.concat` joins all pieces in one pass, while repeated `..` keeps reallocating and copying the growing string.","model_patch":"```lua\n-- Slower: repeatedly copies the growing string.\nlocal slow = \"\"\nfor i = 1, 10000 do\n    slow = slow .. \"piece \" .. i .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece \" .. i .. \"\\n\"\nend\n\nlocal fast = table.concat(parts)\n```\nReason: `table.concat` joins all pieces in one pass, while repeated `..` keeps reallocating and copying the growing string."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8834,"startedAt":"2026-07-11T07:36:04.853Z","completedAt":"2026-07-11T07:36:13.826Z","answerBytes":167,"answerChars":167,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":270,"totalTokens":17112,"reasoningTokens":206,"cachedTokens":16384},"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: surface.DrawRect avoids draw.RoundedBox's wrapper/rounded-corner overhead when radius is 0.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: surface.DrawRect avoids draw.RoundedBox's wrapper/rounded-corner overhead when radius is 0."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14848,"startedAt":"2026-07-11T07:36:05.530Z","completedAt":"2026-07-11T07:36:20.433Z","answerBytes":435,"answerChars":435,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16841,"completionTokens":661,"totalTokens":17502,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nlocal text = \"Single line\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` does the direct single-line draw work, avoiding `draw.DrawText` multiline/layout overhead and `SimpleTextOutlined` extra outline draws.","model_patch":"```lua\nlocal text = \"Single line\"\nlocal font = \"DermaDefault\"\nlocal x, y = 32, 32\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` does the direct single-line draw work, avoiding `draw.DrawText` multiline/layout overhead and `SimpleTextOutlined` extra outline draws."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9501,"startedAt":"2026-07-11T07:36:07.256Z","completedAt":"2026-07-11T07:36:16.782Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16833,"completionTokens":349,"totalTokens":17182,"reasoningTokens":293,"cachedTokens":16384},"finalResponse":"```lua\nlocal length = #arrayLikeTable\n```\nReason: `#` is the preferred length operator for sequential array-like tables; `table.Count` is for counting keyed entries.","model_patch":"```lua\nlocal length = #arrayLikeTable\n```\nReason: `#` is the preferred length operator for sequential array-like tables; `table.Count` is for counting keyed entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14883,"startedAt":"2026-07-11T07:36:07.453Z","completedAt":"2026-07-11T07:36:22.344Z","answerBytes":203,"answerChars":203,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16840,"completionTokens":576,"totalTokens":17416,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding is generally faster for large sequential tables because it avoids walking every element; use table.Empty(t) only when other references must keep seeing the same table.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding is generally faster for large sequential tables because it avoids walking every element; use table.Empty(t) only when other references must keep seeing the same table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11012,"startedAt":"2026-07-11T07:36:09.742Z","completedAt":"2026-07-11T07:36:20.758Z","answerBytes":461,"answerChars":461,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16842,"completionTokens":329,"totalTokens":17171,"reasoningTokens":175,"cachedTokens":16384},"finalResponse":"```lua\n-- Slower: scans the whole list\nlocal allowedList = { \"weapon_pistol\", \"weapon_smg1\", \"weapon_crowbar\" }\nif table.HasValue(allowedList, weaponClass) then\n    -- allowed\nend\n\n-- Faster: use a set-style table\nlocal allowedSet = {\n    weapon_pistol = true,\n    weapon_smg1 = true,\n    weapon_crowbar = true,\n}\n\nif allowedSet[weaponClass] then\n    -- allowed\nend\n```\nReason: A set table uses direct key lookup, while table.HasValue scans the list every time.","model_patch":"```lua\n-- Slower: scans the whole list\nlocal allowedList = { \"weapon_pistol\", \"weapon_smg1\", \"weapon_crowbar\" }\nif table.HasValue(allowedList, weaponClass) then\n    -- allowed\nend\n\n-- Faster: use a set-style table\nlocal allowedSet = {\n    weapon_pistol = true,\n    weapon_smg1 = true,\n    weapon_crowbar = true,\n}\n\nif allowedSet[weaponClass] then\n    -- allowed\nend\n```\nReason: A set table uses direct key lookup, while table.HasValue scans the list every time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9998,"startedAt":"2026-07-11T07:36:10.058Z","completedAt":"2026-07-11T07:36:20.061Z","answerBytes":224,"answerChars":224,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16837,"completionTokens":389,"totalTokens":17226,"reasoningTokens":316,"cachedTokens":16384},"finalResponse":"```lua\nlocal data = {\n    id = id,\n    name = name,\n    score = score,\n}\n```\nReason: The table constructor creates and fills the known fields in one step, avoiding the extra empty-table creation plus later field assignments.","model_patch":"```lua\nlocal data = {\n    id = id,\n    name = name,\n    score = score,\n}\n```\nReason: The table constructor creates and fills the known fields in one step, avoiding the extra empty-table creation plus later field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10380,"startedAt":"2026-07-11T07:36:10.537Z","completedAt":"2026-07-11T07:36:20.926Z","answerBytes":215,"answerChars":215,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16839,"completionTokens":374,"totalTokens":17213,"reasoningTokens":304,"cachedTokens":16384},"finalResponse":"```lua\nlocal item = items[math.random(#items)]\n```\nReason: For a non-empty sequential table, `#items` plus numeric indexing is O(1), while `table.Random` handles arbitrary keyed tables and does extra traversal work.","model_patch":"```lua\nlocal item = items[math.random(#items)]\n```\nReason: For a non-empty sequential table, `#items` plus numeric indexing is O(1), while `table.Random` handles arbitrary keyed tables and does extra traversal work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7231,"startedAt":"2026-07-11T07:36:10.702Z","completedAt":"2026-07-11T07:36:17.962Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16834,"completionTokens":234,"totalTokens":17068,"reasoningTokens":181,"cachedTokens":16384},"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is the preferred fast form for squaring in a tight Lua loop; it avoids exponentiation overhead.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Multiplication is the preferred fast form for squaring in a tight Lua loop; it avoids exponentiation overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.5@xhigh","model_name_or_path":"gpt-5.5@xhigh","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":13599,"startedAt":"2026-07-11T07:36:11.387Z","completedAt":"2026-07-11T07:36:24.988Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":16844,"completionTokens":575,"totalTokens":17419,"reasoningTokens":516,"cachedTokens":16384},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` visits connected players directly without creating the `player.GetAll()` table first.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` visits connected players directly without creating the `player.GetAll()` table first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4568,"startedAt":"2026-07-11T07:36:12.066Z","completedAt":"2026-07-11T07:36:16.680Z","answerBytes":262,"answerChars":262,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":99,"totalTokens":14998,"reasoningTokens":13,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so it avoids materializing a full table like `ents.GetAll()` before filtering by class.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so it avoids materializing a full table like `ents.GetAll()` before filtering by class."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":6324,"startedAt":"2026-07-11T07:36:12.240Z","completedAt":"2026-07-11T07:36:18.575Z","answerBytes":191,"answerChars":191,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14903,"completionTokens":68,"totalTokens":14971,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and `MyAddon.Think` is the unique identifier for that registration.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and `MyAddon.Think` is the unique identifier for that registration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":3969,"startedAt":"2026-07-11T07:36:13.376Z","completedAt":"2026-07-11T07:36:17.347Z","answerBytes":216,"answerChars":216,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":71,"totalTokens":14969,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that the entity reference exists and has not been removed, so method calls are safe behind that guard.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that the entity reference exists and has not been removed, so method calls are safe behind that guard."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4924,"startedAt":"2026-07-11T07:36:13.606Z","completedAt":"2026-07-11T07:36:18.573Z","answerBytes":205,"answerChars":205,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14891,"completionTokens":64,"totalTokens":14955,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` registers the callback for the named incoming net message on the receiving side.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` registers the callback for the named incoming net message on the receiving side."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":6338,"startedAt":"2026-07-11T07:36:13.830Z","completedAt":"2026-07-11T07:36:20.193Z","answerBytes":326,"answerChars":326,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":133,"totalTokens":15030,"reasoningTokens":19,"cachedTokens":14336},"finalResponse":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: reuse the shared zero angle instead of allocating a new one.\nentity:SetAngles(ZERO_ANGLE)\n\n-- Slower in a hot path:\n-- entity:SetAngles(Angle(0, 0, 0))\n```\nReason: Reusing one cached zero `Angle` avoids repeated object allocation and constructor overhead in the hot path.","model_patch":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: reuse the shared zero angle instead of allocating a new one.\nentity:SetAngles(ZERO_ANGLE)\n\n-- Slower in a hot path:\n-- entity:SetAngles(Angle(0, 0, 0))\n```\nReason: Reusing one cached zero `Angle` avoids repeated object allocation and constructor overhead in the hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5399,"startedAt":"2026-07-11T07:36:14.813Z","completedAt":"2026-07-11T07:36:20.318Z","answerBytes":217,"answerChars":217,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":90,"totalTokens":14994,"reasoningTokens":16,"cachedTokens":0},"finalResponse":"```lua\nlocal MYADDON_COLOR = Color(255, 255, 255)\n\nlocal color = MYADDON_COLOR\n```\nReason: A flat local is faster to read because it avoids repeated table lookups and benefits from Lua's cheapest variable access path.","model_patch":"```lua\nlocal MYADDON_COLOR = Color(255, 255, 255)\n\nlocal color = MYADDON_COLOR\n```\nReason: A flat local is faster to read because it avoids repeated table lookups and benefits from Lua's cheapest variable access path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":4949,"startedAt":"2026-07-11T07:36:14.887Z","completedAt":"2026-07-11T07:36:19.875Z","answerBytes":305,"answerChars":303,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":102,"totalTokens":14998,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = team.GetName(ply:Team())\n-- instead of: local jobName = ply:GetNWString(\"job\")\n```\nReason: `team.GetName(ply:Team())` is the canonical DarkRP/GMod source of a player’s current job name, while `GetNWString(\"job\")` depends on networked state and is less reliable as an API contract.","model_patch":"```lua\nlocal jobName = team.GetName(ply:Team())\n-- instead of: local jobName = ply:GetNWString(\"job\")\n```\nReason: `team.GetName(ply:Team())` is the canonical DarkRP/GMod source of a player’s current job name, while `GetNWString(\"job\")` depends on networked state and is less reliable as an API contract."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4631,"startedAt":"2026-07-11T07:36:14.995Z","completedAt":"2026-07-11T07:36:19.662Z","answerBytes":234,"answerChars":234,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":81,"totalTokens":14978,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= (radius * radius) then\n    -- within radius\nend\n```\nReason: `Vector:DistToSqr` avoids the square root work of `Distance` when you only need a threshold comparison, so it is the preferred faster check.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= (radius * radius) then\n    -- within radius\nend\n```\nReason: `Vector:DistToSqr` avoids the square root work of `Distance` when you only need a threshold comparison, so it is the preferred faster check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":14642,"startedAt":"2026-07-11T07:36:15.100Z","completedAt":"2026-07-11T07:36:29.753Z","answerBytes":344,"answerChars":344,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14895,"completionTokens":198,"totalTokens":15093,"reasoningTokens":94,"cachedTokens":0},"finalResponse":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        -- use ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- use ent\n    end\nend\n```\nReason: `ents.Iterator()` avoids building the full entity table and is the preferred efficient iterator when available; `ipairs(ents.GetAll())` is the compatible fallback.","model_patch":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        -- use ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- use ent\n    end\nend\n```\nReason: `ents.Iterator()` avoids building the full entity table and is the preferred efficient iterator when available; `ipairs(ents.GetAll())` is the compatible fallback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12565,"startedAt":"2026-07-11T07:36:15.350Z","completedAt":"2026-07-11T07:36:27.921Z","answerBytes":309,"answerChars":309,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14912,"completionTokens":117,"totalTokens":15029,"reasoningTokens":13,"cachedTokens":14336},"finalResponse":"```lua\nlocal radius = 512\nlocal origin = ply:GetPos()\nlocal nearby = ents.FindInSphere(origin, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    -- use ent\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in default for cheap nearby-entity queries without relying on PVS visibility state.","model_patch":"```lua\nlocal radius = 512\nlocal origin = ply:GetPos()\nlocal nearby = ents.FindInSphere(origin, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    -- use ent\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in default for cheap nearby-entity queries without relying on PVS visibility state."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14544,"startedAt":"2026-07-11T07:36:16.146Z","completedAt":"2026-07-11T07:36:30.813Z","answerBytes":642,"answerChars":642,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":212,"totalTokens":15120,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nlocal player_GetAll = player.GetAll\nlocal DistToSqr = FindMetaTable(\"Vector\").DistToSqr\n\nlocal function FindPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local playersInRange = {}\n\n    for i = 1, #player_GetAll() do\n        local ply = player_GetAll()[i]\n        if DistToSqr(ply:GetPos(), pos) <= radiusSqr then\n            playersInRange[#playersInRange + 1] = ply\n        end\n    end\n\n    return playersInRange\nend\n```\nReason: Iterating `player.GetAll()` avoids the broad entity-sphere search and class filtering overhead of `ents.FindInSphere`, and squared-distance checks avoid the extra square root cost.","model_patch":"```lua\nlocal player_GetAll = player.GetAll\nlocal DistToSqr = FindMetaTable(\"Vector\").DistToSqr\n\nlocal function FindPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local playersInRange = {}\n\n    for i = 1, #player_GetAll() do\n        local ply = player_GetAll()[i]\n        if DistToSqr(ply:GetPos(), pos) <= radiusSqr then\n            playersInRange[#playersInRange + 1] = ply\n        end\n    end\n\n    return playersInRange\nend\n```\nReason: Iterating `player.GetAll()` avoids the broad entity-sphere search and class filtering overhead of `ents.FindInSphere`, and squared-distance checks avoid the extra square root cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12834,"startedAt":"2026-07-11T07:36:16.355Z","completedAt":"2026-07-11T07:36:29.221Z","answerBytes":247,"answerChars":247,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":138,"totalTokens":15037,"reasoningTokens":57,"cachedTokens":14336},"finalResponse":"```lua\nfor i = 1, n do\n    -- body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting loops in Garry's Mod Lua because it uses the VM's specialized loop primitive with less per-iteration overhead than an equivalent `while`. ","model_patch":"```lua\nfor i = 1, n do\n    -- body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting loops in Garry's Mod Lua because it uses the VM's specialized loop primitive with less per-iteration overhead than an equivalent `while`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":14376,"startedAt":"2026-07-11T07:36:16.688Z","completedAt":"2026-07-11T07:36:31.080Z","answerBytes":659,"answerChars":659,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14911,"completionTokens":199,"totalTokens":15110,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nlocal players = player.GetHumans()\n\n-- Faster: one hook dispatch, handlers loop players internally.\nhook.Run(\"MyPlayersTick\", players)\n\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(playersList)\n    for i = 1, #playersList do\n        local ply = playersList[i]\n        if not IsValid(ply) then continue end\n\n        -- per-player custom logic here\n    end\nend)\n\n-- Slower pattern:\nfor i = 1, #players do\n    hook.Run(\"MyPlayerTick\", players[i])\nend\n```\nReason: One `hook.Run` avoids repeated hook-system dispatch, argument setup, and lookup work every tick; looping players inside the handler is cheaper than re-entering the hook system per player.","model_patch":"```lua\nlocal players = player.GetHumans()\n\n-- Faster: one hook dispatch, handlers loop players internally.\nhook.Run(\"MyPlayersTick\", players)\n\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(playersList)\n    for i = 1, #playersList do\n        local ply = playersList[i]\n        if not IsValid(ply) then continue end\n\n        -- per-player custom logic here\n    end\nend)\n\n-- Slower pattern:\nfor i = 1, #players do\n    hook.Run(\"MyPlayerTick\", players[i])\nend\n```\nReason: One `hook.Run` avoids repeated hook-system dispatch, argument setup, and lookup work every tick; looping players inside the handler is cheaper than re-entering the hook system per player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13691,"startedAt":"2026-07-11T07:36:16.800Z","completedAt":"2026-07-11T07:36:30.503Z","answerBytes":385,"answerChars":385,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":156,"totalTokens":15062,"reasoningTokens":13,"cachedTokens":14336},"finalResponse":"```lua\nlocal hp = LocalPlayer():Health()\n\ndraw.SimpleText(hp, \"DermaLarge\", x1, y1, color_white)\ndraw.RoundedBox(4, x2, y2, math.max(hp, 0) * 2, 20, color_green)\ndraw.SimpleText(hp .. \"%\", \"Trebuchet24\", x3, y3, color_white)\n```\nReason: Cache `LocalPlayer():Health()` in a local once per frame so the three draw calls reuse one value instead of making the same engine call three times.","model_patch":"```lua\nlocal hp = LocalPlayer():Health()\n\ndraw.SimpleText(hp, \"DermaLarge\", x1, y1, color_white)\ndraw.RoundedBox(4, x2, y2, math.max(hp, 0) * 2, 20, color_green)\ndraw.SimpleText(hp .. \"%\", \"Trebuchet24\", x3, y3, color_white)\n```\nReason: Cache `LocalPlayer():Health()` in a local once per frame so the three draw calls reuse one value instead of making the same engine call three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13888,"startedAt":"2026-07-11T07:36:17.021Z","completedAt":"2026-07-11T07:36:30.954Z","answerBytes":265,"answerChars":265,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14894,"completionTokens":103,"totalTokens":14997,"reasoningTokens":8,"cachedTokens":14336},"finalResponse":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(COLOR_WHITE)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Reusing one `Color` object avoids per-frame allocation and constructor overhead inside the paint loop.","model_patch":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(COLOR_WHITE)\n    surface.DrawRect(0, 0, w, h)\nend\n```\nReason: Reusing one `Color` object avoids per-frame allocation and constructor overhead inside the paint loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12126,"startedAt":"2026-07-11T07:36:17.354Z","completedAt":"2026-07-11T07:36:29.491Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":84,"totalTokens":14980,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local y = sin(i)\n    -- hot path work\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookups inside the loop, which is a small but common Lua hot-path optimization.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local y = sin(i)\n    -- hot path work\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookups inside the loop, which is a small but common Lua hot-path optimization."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15089,"startedAt":"2026-07-11T07:36:17.573Z","completedAt":"2026-07-11T07:36:32.697Z","answerBytes":657,"answerChars":657,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":201,"totalTokens":15098,"reasoningTokens":17,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedPly\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedPly = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = cachedPly\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        if not IsValid(ply) then return end\n        cachedPly = ply\n    end\n\n    local pos = ply:GetPos()\n    -- use ply repeatedly here instead of calling LocalPlayer() again\nend)\n```\nReason: Cache the player entity once and reuse a local variable in hot paths, so you avoid repeated global function lookup and repeated `LocalPlayer()` calls while still refreshing if the cached entity becomes invalid.","model_patch":"```lua\nlocal cachedPly\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    cachedPly = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    local ply = cachedPly\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        if not IsValid(ply) then return end\n        cachedPly = ply\n    end\n\n    local pos = ply:GetPos()\n    -- use ply repeatedly here instead of calling LocalPlayer() again\nend)\n```\nReason: Cache the player entity once and reuse a local variable in hot paths, so you avoid repeated global function lookup and repeated `LocalPlayer()` calls while still refreshing if the cached entity becomes invalid."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14087,"startedAt":"2026-07-11T07:36:17.715Z","completedAt":"2026-07-11T07:36:31.915Z","answerBytes":477,"answerChars":477,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14913,"completionTokens":173,"totalTokens":15086,"reasoningTokens":21,"cachedTokens":14336},"finalResponse":"```lua\nlocal COS_45 = 0.70710678 -- cos(45 deg), tune threshold as needed\n\nlocal function RoughlyLookingAtEachOther(plyA, plyB)\n    local a = plyA:GetAimVector()\n    local b = plyB:GetAimVector()\n\n    -- Dot product near -1 means the aim directions face each other.\n    return a:Dot(b) <= -COS_45\nend\n```\nReason: A dot product is much cheaper than `math.acos`; comparing `a:Dot(b)` against a cosine threshold avoids angle conversion while still giving a fast rough facing test.","model_patch":"```lua\nlocal COS_45 = 0.70710678 -- cos(45 deg), tune threshold as needed\n\nlocal function RoughlyLookingAtEachOther(plyA, plyB)\n    local a = plyA:GetAimVector()\n    local b = plyB:GetAimVector()\n\n    -- Dot product near -1 means the aim directions face each other.\n    return a:Dot(b) <= -COS_45\nend\n```\nReason: A dot product is much cheaper than `math.acos`; comparing `a:Dot(b)` against a cosine threshold avoids angle conversion while still giving a fast rough facing test."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14558,"startedAt":"2026-07-11T07:36:18.165Z","completedAt":"2026-07-11T07:36:32.844Z","answerBytes":225,"answerChars":225,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14905,"completionTokens":200,"totalTokens":15105,"reasoningTokens":127,"cachedTokens":14336},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally a bit faster for a helper you control because it can call a plain/local function directly, while `ply:SomeHelper()` adds a method lookup before passing `self`.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally a bit faster for a helper you control because it can call a plain/local function directly, while `ply:SomeHelper()` adds a method lookup before passing `self`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13209,"startedAt":"2026-07-11T07:36:18.369Z","completedAt":"2026-07-11T07:36:31.700Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":140,"totalTokens":15038,"reasoningTokens":68,"cachedTokens":14336},"finalResponse":"```lua\nMsgN(\"[debug] velocity=\", velocity, \" state=\", state)\n```\nReason: `MsgN` is a lighter console write path than `print` in Garry's Mod, so it avoids extra formatting overhead in hot code.","model_patch":"```lua\nMsgN(\"[debug] velocity=\", velocity, \" state=\", state)\n```\nReason: `MsgN` is a lighter console write path than `print` in Garry's Mod, so it avoids extra formatting overhead in hot code."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11816,"startedAt":"2026-07-11T07:36:18.636Z","completedAt":"2026-07-11T07:36:30.550Z","answerBytes":255,"answerChars":255,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":99,"totalTokens":15007,"reasoningTokens":8,"cachedTokens":14336},"finalResponse":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: A numeric `for` over a dense sequential table avoids the iterator overhead of `pairs` and `ipairs`, so it is the fastest typical choice in Garry's Mod Lua for array-like numeric data.","model_patch":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: A numeric `for` over a dense sequential table avoids the iterator overhead of `pairs` and `ipairs`, so it is the fastest typical choice in Garry's Mod Lua for array-like numeric data."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13741,"startedAt":"2026-07-11T07:36:18.687Z","completedAt":"2026-07-11T07:36:32.483Z","answerBytes":420,"answerChars":420,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14916,"completionTokens":161,"totalTokens":15077,"reasoningTokens":21,"cachedTokens":14336},"finalResponse":"```lua\nlocal players = player.GetAll()\nlocal result = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() and ply:isCP() then\n        n = n + 1\n        result[n] = ply:Nick()\n    end\nend\n\nreturn result\n```\nReason: A single plain Lua loop avoids DarkRP fn combinator call overhead, extra closures, and intermediate tables while doing the same filter+map work in one pass.","model_patch":"```lua\nlocal players = player.GetAll()\nlocal result = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local ply = players[i]\n    if IsValid(ply) and ply:Alive() and ply:isCP() then\n        n = n + 1\n        result[n] = ply:Nick()\n    end\nend\n\nreturn result\n```\nReason: A single plain Lua loop avoids DarkRP fn combinator call overhead, extra closures, and intermediate tables while doing the same filter+map work in one pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14912,"startedAt":"2026-07-11T07:36:18.839Z","completedAt":"2026-07-11T07:36:33.754Z","answerBytes":688,"answerChars":688,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14911,"completionTokens":201,"totalTokens":15112,"reasoningTokens":13,"cachedTokens":14336},"finalResponse":"```lua\nlocal activePlayers = {}\n\nlocal function refreshActivePlayers()\n    activePlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshActivePlayersJoin\", refreshActivePlayers)\nhook.Add(\"PlayerDisconnected\", \"RefreshActivePlayersLeave\", refreshActivePlayers)\n\nrefreshActivePlayers()\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #activePlayers do\n        local ply = activePlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates and walks the player list each tick; caching moves that cost to join/leave events so the hot Tick path only iterates the current table.","model_patch":"```lua\nlocal activePlayers = {}\n\nlocal function refreshActivePlayers()\n    activePlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshActivePlayersJoin\", refreshActivePlayers)\nhook.Add(\"PlayerDisconnected\", \"RefreshActivePlayersLeave\", refreshActivePlayers)\n\nrefreshActivePlayers()\n\nhook.Add(\"Tick\", \"UseCachedPlayers\", function()\n    for i = 1, #activePlayers do\n        local ply = activePlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates and walks the player list each tick; caching moves that cost to join/leave events so the hot Tick path only iterates the current table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":14803,"startedAt":"2026-07-11T07:36:19.083Z","completedAt":"2026-07-11T07:36:33.889Z","answerBytes":500,"answerChars":500,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":211,"totalTokens":15109,"reasoningTokens":61,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedScore = {}\n\nlocal function SetCachedScore(ply, value)\n    cachedScore[ply:EntIndex()] = value\nend\n\nlocal function GetCachedScore(ply)\n    return cachedScore[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedScore\", function(ply)\n    cachedScore[ply:EntIndex()] = nil\nend)\n```\nReason: Array-style lookup through a local Lua table keyed by `ply:EntIndex()` avoids the player userdata/metatable field access path, so hot reads are typically faster than `ply.someField`. ","model_patch":"```lua\nlocal cachedScore = {}\n\nlocal function SetCachedScore(ply, value)\n    cachedScore[ply:EntIndex()] = value\nend\n\nlocal function GetCachedScore(ply)\n    return cachedScore[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedScore\", function(ply)\n    cachedScore[ply:EntIndex()] = nil\nend)\n```\nReason: Array-style lookup through a local Lua table keyed by `ply:EntIndex()` avoids the player userdata/metatable field access path, so hot reads are typically faster than `ply.someField`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12337,"startedAt":"2026-07-11T07:36:19.390Z","completedAt":"2026-07-11T07:36:31.757Z","answerBytes":292,"answerChars":292,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":104,"totalTokens":15005,"reasoningTokens":9,"cachedTokens":14336},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\", \"delta\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate because Lua stores and traverses the array part more efficiently than string-keyed hash maps.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\", \"delta\" }\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate because Lua stores and traverses the array part more efficiently than string-keyed hash maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13111,"startedAt":"2026-07-11T07:36:19.661Z","completedAt":"2026-07-11T07:36:32.795Z","answerBytes":189,"answerChars":189,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":91,"totalTokens":14997,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw RGBA numbers avoids the extra table/object access from a `Color` value, so it is the faster style in a hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw RGBA numbers avoids the extra table/object access from a `Color` value, so it is the faster style in a hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14923,"startedAt":"2026-07-11T07:36:19.683Z","completedAt":"2026-07-11T07:36:34.613Z","answerBytes":269,"answerChars":269,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14924,"completionTokens":106,"totalTokens":15030,"reasoningTokens":27,"cachedTokens":14336},"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT money FROM players WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round trips and remote database overhead.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT money FROM players WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round trips and remote database overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16061,"startedAt":"2026-07-11T07:36:20.006Z","completedAt":"2026-07-11T07:36:36.127Z","answerBytes":687,"answerChars":687,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":208,"totalTokens":15105,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"EntityRemoved\", \"ClearSteamIDCache\", function(ent)\n    steamIdCache[ent] = nil\nend)\n\n-- hot path\nlocal function HandlePlayer(ply)\n    local steamId = GetSteamIDCached(ply)\n    -- use steamId repeatedly here\nend\n```\nReason: Cache the per-player SteamID once and reuse it, avoiding repeated Lua-to-engine calls on the hot path while weak keys prevent stale player references from being kept alive.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"EntityRemoved\", \"ClearSteamIDCache\", function(ent)\n    steamIdCache[ent] = nil\nend)\n\n-- hot path\nlocal function HandlePlayer(ply)\n    local steamId = GetSteamIDCached(ply)\n    -- use steamId repeatedly here\nend\n```\nReason: Cache the per-player SteamID once and reuse it, avoiding repeated Lua-to-engine calls on the hot path while weak keys prevent stale player references from being kept alive."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":13159,"startedAt":"2026-07-11T07:36:20.064Z","completedAt":"2026-07-11T07:36:33.710Z","answerBytes":286,"answerChars":286,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":115,"totalTokens":15011,"reasoningTokens":13,"cachedTokens":0},"finalResponse":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece_\" .. i\nend\n\nlocal big = table.concat(parts)\nprint(big)\n```\nReason: `table.concat` is faster because repeated `..` rebuilds and copies the growing string on each append, while `table.concat` joins all pieces in one pass.","model_patch":"```lua\nlocal parts = {}\n\nfor i = 1, 10000 do\n    parts[i] = \"piece_\" .. i\nend\n\nlocal big = table.concat(parts)\nprint(big)\n```\nReason: `table.concat` is faster because repeated `..` rebuilds and copies the growing string on each append, while `table.concat` joins all pieces in one pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13427,"startedAt":"2026-07-11T07:36:20.065Z","completedAt":"2026-07-11T07:36:33.974Z","answerBytes":207,"answerChars":207,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":98,"totalTokens":14998,"reasoningTokens":21,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the extra `draw.RoundedBox` wrapper work, so for plain non-rounded rectangles it is slightly faster.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids the extra `draw.RoundedBox` wrapper work, so for plain non-rounded rectangles it is slightly faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17937,"startedAt":"2026-07-11T07:36:20.304Z","completedAt":"2026-07-11T07:36:38.635Z","answerBytes":805,"answerChars":805,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":328,"totalTokens":15229,"reasoningTokens":66,"cachedTokens":14336},"finalResponse":"```lua\n-- Fast path for drawing the same single-line string each frame.\n-- Lower-level surface text calls avoid the extra work in draw.DrawText / draw.SimpleTextOutlined.\n\nlocal font = \"DermaLarge\"\nlocal text = \"Speed\"\nlocal x, y = 100, 80\nlocal r, g, b, a = 255, 255, 255, 255\n\nsurface.CreateFont(\"BenchFastText\", {\n    font = \"Tahoma\",\n    size = 24,\n    weight = 500,\n    antialias = true,\n})\n\nhook.Add(\"HUDPaint\", \"BenchFastText\", function()\n    surface.SetFont(\"BenchFastText\")\n    surface.SetTextColor(r, g, b, a)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the leaner hot-path for single-line text; `draw.DrawText` adds wrapping/alignment handling and `draw.SimpleTextOutlined` adds extra outline passes.","model_patch":"```lua\n-- Fast path for drawing the same single-line string each frame.\n-- Lower-level surface text calls avoid the extra work in draw.DrawText / draw.SimpleTextOutlined.\n\nlocal font = \"DermaLarge\"\nlocal text = \"Speed\"\nlocal x, y = 100, 80\nlocal r, g, b, a = 255, 255, 255, 255\n\nsurface.CreateFont(\"BenchFastText\", {\n    font = \"Tahoma\",\n    size = 24,\n    weight = 500,\n    antialias = true,\n})\n\nhook.Add(\"HUDPaint\", \"BenchFastText\", function()\n    surface.SetFont(\"BenchFastText\")\n    surface.SetTextColor(r, g, b, a)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the leaner hot-path for single-line text; `draw.DrawText` adds wrapping/alignment handling and `draw.SimpleTextOutlined` adds extra outline passes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12372,"startedAt":"2026-07-11T07:36:20.400Z","completedAt":"2026-07-11T07:36:33.112Z","answerBytes":145,"answerChars":145,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14889,"completionTokens":55,"totalTokens":14944,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nlocal len = #tbl\n```\nReason: `#` is the idiomatic and preferred way to get the length of a sequential array-like table in Garry's Mod Lua.","model_patch":"```lua\nlocal len = #tbl\n```\nReason: `#` is the idiomatic and preferred way to get the length of a sequential array-like table in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12264,"startedAt":"2026-07-11T07:36:20.507Z","completedAt":"2026-07-11T07:36:33.012Z","answerBytes":251,"answerChars":251,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14902,"completionTokens":84,"totalTokens":14986,"reasoningTokens":8,"cachedTokens":14336},"finalResponse":"```lua\nlocal t = {}\n```\nReason: Rebinding with `t = {}` is generally faster because it avoids iterating and clearing every existing array slot like `table.Empty(t)` does; use `table.Empty(t)` only when other references must keep the same table object.","model_patch":"```lua\nlocal t = {}\n```\nReason: Rebinding with `t = {}` is generally faster because it avoids iterating and clearing every existing array slot like `table.Empty(t)` does; use `table.Empty(t)` only when other references must keep the same table object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13443,"startedAt":"2026-07-11T07:36:20.546Z","completedAt":"2026-07-11T07:36:34.195Z","answerBytes":294,"answerChars":294,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14902,"completionTokens":124,"totalTokens":15026,"reasoningTokens":14,"cachedTokens":14336},"finalResponse":"```lua\n-- Slow on a list: table.HasValue(allowed, value)\n\nlocal allowed = {\n    foo = true,\n    bar = true,\n    baz = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: A keyed lookup is O(1) on average, while `table.HasValue` scans the list linearly with O(n) cost.","model_patch":"```lua\n-- Slow on a list: table.HasValue(allowed, value)\n\nlocal allowed = {\n    foo = true,\n    bar = true,\n    baz = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: A keyed lookup is O(1) on average, while `table.HasValue` scans the list linearly with O(n) cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13803,"startedAt":"2026-07-11T07:36:20.845Z","completedAt":"2026-07-11T07:36:34.886Z","answerBytes":298,"answerChars":298,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":131,"totalTokens":15028,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nlocal t = { x = 1, y = 2, z = 3 } -- faster\n\n-- Slower:\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: For a small table with known keys, the table constructor is faster because it builds and populates the table in one step instead of doing multiple separate field assignments.","model_patch":"```lua\nlocal t = { x = 1, y = 2, z = 3 } -- faster\n\n-- Slower:\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: For a small table with known keys, the table constructor is faster because it builds and populates the table in one step instead of doing multiple separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14105,"startedAt":"2026-07-11T07:36:20.990Z","completedAt":"2026-07-11T07:36:35.559Z","answerBytes":223,"answerChars":223,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14893,"completionTokens":92,"totalTokens":14985,"reasoningTokens":16,"cachedTokens":14336},"finalResponse":"```lua\nlocal n = #t\nlocal value = n > 0 and t[math.random(n)] or nil\n```\nReason: For a sequential table, direct indexed lookup with `math.random(#t)` avoids the extra key collection and branching overhead of `table.Random`.","model_patch":"```lua\nlocal n = #t\nlocal value = n > 0 and t[math.random(n)] or nil\n```\nReason: For a sequential table, direct indexed lookup with `math.random(#t)` avoids the extra key collection and branching overhead of `table.Random`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12260,"startedAt":"2026-07-11T07:36:21.813Z","completedAt":"2026-07-11T07:36:34.434Z","answerBytes":150,"answerChars":150,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14894,"completionTokens":54,"totalTokens":14948,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nlocal x2 = x * x\n```\nReason: `x * x` is the direct arithmetic operation and avoids the extra overhead of generic power helpers in a tight loop.","model_patch":"```lua\nlocal x2 = x * x\n```\nReason: `x * x` is the direct arithmetic operation and avoids the extra overhead of generic power helpers in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4@low","model_name_or_path":"gpt-5.4@low","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":12964,"startedAt":"2026-07-11T07:36:22.061Z","completedAt":"2026-07-11T07:36:35.647Z","answerBytes":178,"answerChars":178,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14902,"completionTokens":70,"totalTokens":14972,"reasoningTokens":10,"cachedTokens":0},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table from `player.GetAll()`. ","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table from `player.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13947,"startedAt":"2026-07-11T07:36:22.655Z","completedAt":"2026-07-11T07:36:36.639Z","answerBytes":276,"answerChars":276,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":173,"totalTokens":15072,"reasoningTokens":83,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so filtering by class avoids allocating a full table like `ents.FindByClass(\"prop_physics\")` would.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so filtering by class avoids allocating a full table like `ents.FindByClass(\"prop_physics\")` would."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":12492,"startedAt":"2026-07-11T07:36:25.026Z","completedAt":"2026-07-11T07:36:37.582Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14903,"completionTokens":72,"totalTokens":14975,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook, and `MyAddon.Think` is the unique identifier for that callback.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook, and `MyAddon.Think` is the unique identifier for that callback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":11827,"startedAt":"2026-07-11T07:36:27.937Z","completedAt":"2026-07-11T07:36:39.782Z","answerBytes":211,"answerChars":211,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":80,"totalTokens":14976,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that rejects `nil`, invalid entity handles, and removed entities before you call methods on them.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that rejects `nil`, invalid entity handles, and removed entities before you call methods on them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11646,"startedAt":"2026-07-11T07:36:29.222Z","completedAt":"2026-07-11T07:36:40.870Z","answerBytes":218,"answerChars":218,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14891,"completionTokens":80,"totalTokens":14971,"reasoningTokens":8,"cachedTokens":14336},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` registers the callback that Garry's Mod runs whenever the `MyAddon.Sync` net message arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` registers the callback that Garry's Mod runs whenever the `MyAddon.Sync` net message arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":21448,"startedAt":"2026-07-11T07:36:29.493Z","completedAt":"2026-07-11T07:36:50.943Z","answerBytes":447,"answerChars":447,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":459,"totalTokens":15358,"reasoningTokens":320,"cachedTokens":14336},"finalResponse":"```lua\nlocal scratchAng = Angle()\n\nlocal function GetScratchZeroAngle()\n    scratchAng.p = 0\n    scratchAng.y = 0\n    scratchAng.r = 0\n    return scratchAng\nend\n\n-- slower in a hot path:\n-- local ang = Angle()\n\n-- faster in a hot path:\nlocal ang = GetScratchZeroAngle()\n```\nReason: Reusing one preallocated `Angle` and zeroing its fields avoids repeated allocation and GC work, which is cheaper on hot paths than constructing `Angle()` every time.","model_patch":"```lua\nlocal scratchAng = Angle()\n\nlocal function GetScratchZeroAngle()\n    scratchAng.p = 0\n    scratchAng.y = 0\n    scratchAng.r = 0\n    return scratchAng\nend\n\n-- slower in a hot path:\n-- local ang = Angle()\n\n-- faster in a hot path:\nlocal ang = GetScratchZeroAngle()\n```\nReason: Reusing one preallocated `Angle` and zeroing its fields avoids repeated allocation and GC work, which is cheaper on hot paths than constructing `Angle()` every time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11294,"startedAt":"2026-07-11T07:36:29.757Z","completedAt":"2026-07-11T07:36:41.055Z","answerBytes":215,"answerChars":215,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":83,"totalTokens":14989,"reasoningTokens":9,"cachedTokens":0},"finalResponse":"```lua\nlocal MYADDON_COLOR = Color(255, 0, 0)\n\nlocal color = MYADDON_COLOR\n```\nReason: A flat local is faster for frequent reads because it avoids repeated table lookups and uses Lua's cheapest variable access path.","model_patch":"```lua\nlocal MYADDON_COLOR = Color(255, 0, 0)\n\nlocal color = MYADDON_COLOR\n```\nReason: A flat local is faster for frequent reads because it avoids repeated table lookups and uses Lua's cheapest variable access path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":12410,"startedAt":"2026-07-11T07:36:30.505Z","completedAt":"2026-07-11T07:36:42.916Z","answerBytes":364,"answerChars":364,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":116,"totalTokens":15012,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal teamData = RPExtraTeams[ply:Team()]\nlocal jobName = teamData and teamData.name or team.GetName(ply:Team())\n```\nReason: DarkRP stores the authoritative job on the player's team, so `ply:Team()` with `RPExtraTeams` or `team.GetName` is the supported path; `GetNWString(\"job\")` is legacy networked state that can be missing, stale, or gamemode-dependent.","model_patch":"```lua\nlocal teamData = RPExtraTeams[ply:Team()]\nlocal jobName = teamData and teamData.name or team.GetName(ply:Team())\n```\nReason: DarkRP stores the authoritative job on the player's team, so `ply:Team()` with `RPExtraTeams` or `team.GetName` is the supported path; `GetNWString(\"job\")` is legacy networked state that can be missing, stale, or gamemode-dependent."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12725,"startedAt":"2026-07-11T07:36:30.552Z","completedAt":"2026-07-11T07:36:43.278Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":88,"totalTokens":14985,"reasoningTokens":12,"cachedTokens":0},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= (radius * radius) then\n    -- within radius\nend\n```\nReason: `Vector:DistToSqr` avoids the expensive square root used by real distance and is the preferred method for threshold comparisons.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= (radius * radius) then\n    -- within radius\nend\n```\nReason: `Vector:DistToSqr` avoids the expensive square root used by real distance and is the preferred method for threshold comparisons."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12934,"startedAt":"2026-07-11T07:36:30.814Z","completedAt":"2026-07-11T07:36:43.750Z","answerBytes":304,"answerChars":304,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14893,"completionTokens":142,"totalTokens":15035,"reasoningTokens":54,"cachedTokens":14336},"finalResponse":"```lua\nlocal iter = ents.Iterator and ents.Iterator() or ipairs(ents.GetAll())\n\nfor _, ent in iter do\n    -- use ent\nend\n```\nReason: `ents.Iterator()` avoids building a full entity table and is the efficient wiki-recommended choice; the fallback keeps the loop working where that iterator is unavailable.","model_patch":"```lua\nlocal iter = ents.Iterator and ents.Iterator() or ipairs(ents.GetAll())\n\nfor _, ent in iter do\n    -- use ent\nend\n```\nReason: `ents.Iterator()` avoids building a full entity table and is the efficient wiki-recommended choice; the fallback keeps the loop working where that iterator is unavailable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15288,"startedAt":"2026-07-11T07:36:30.984Z","completedAt":"2026-07-11T07:36:46.277Z","answerBytes":409,"answerChars":409,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14914,"completionTokens":147,"totalTokens":15061,"reasoningTokens":19,"cachedTokens":14336},"finalResponse":"```lua\nlocal center = ply:GetPos()\nlocal radius = 512\nlocal nearby = ents.FindInSphere(center, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in default for cheap nearby-entity queries, using direct radius filtering without the broader visibility semantics and extra noise of `FindInPVS`.","model_patch":"```lua\nlocal center = ply:GetPos()\nlocal radius = 512\nlocal nearby = ents.FindInSphere(center, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if IsValid(ent) then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in default for cheap nearby-entity queries, using direct radius filtering without the broader visibility semantics and extra noise of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19863,"startedAt":"2026-07-11T07:36:31.081Z","completedAt":"2026-07-11T07:36:50.946Z","answerBytes":613,"answerChars":613,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":251,"totalTokens":15157,"reasoningTokens":76,"cachedTokens":14336},"finalResponse":"```lua\nlocal player_GetAll = player.GetAll\n\nlocal function FindPlayersNear(pos, radius)\n    local players = player_GetAll()\n    local result = {}\n    local radiusSqr = radius * radius\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            result[count] = ply\n        end\n    end\n\n    return result\nend\n```\nReason: Iterating `player.GetAll()` and comparing squared distance avoids scanning every entity and avoids the extra player-filter pass, which is usually much cheaper on busy servers.","model_patch":"```lua\nlocal player_GetAll = player.GetAll\n\nlocal function FindPlayersNear(pos, radius)\n    local players = player_GetAll()\n    local result = {}\n    local radiusSqr = radius * radius\n    local count = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            result[count] = ply\n        end\n    end\n\n    return result\nend\n```\nReason: Iterating `player.GetAll()` and comparing squared distance avoids scanning every entity and avoids the extra player-filter pass, which is usually much cheaper on busy servers."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12525,"startedAt":"2026-07-11T07:36:31.701Z","completedAt":"2026-07-11T07:36:44.229Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":129,"totalTokens":15028,"reasoningTokens":46,"cachedTokens":14336},"finalResponse":"```lua\nfor i = 1, n do\n    -- hot loop body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the loop control is built in and avoids the extra increment/check work of a manual `while` loop.","model_patch":"```lua\nfor i = 1, n do\n    -- hot loop body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the loop control is built in and avoids the extra increment/check work of a manual `while` loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13714,"startedAt":"2026-07-11T07:36:31.758Z","completedAt":"2026-07-11T07:36:45.474Z","answerBytes":548,"answerChars":548,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14911,"completionTokens":200,"totalTokens":15111,"reasoningTokens":40,"cachedTokens":14336},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, pass all players to listeners.\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyPlayersTick\", players)\nend)\n\n-- Slower: repeated hook dispatch for every player each tick.\nhook.Add(\"Tick\", \"NotifyCustomLogic_Slower\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyPlayerTick\", ply)\n    end\nend)\n```\nReason: Calling `hook.Run` once avoids per-player hook dispatch overhead, table lookups, and vararg/setup costs every tick.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, pass all players to listeners.\nhook.Add(\"Tick\", \"NotifyCustomLogic\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyPlayersTick\", players)\nend)\n\n-- Slower: repeated hook dispatch for every player each tick.\nhook.Add(\"Tick\", \"NotifyCustomLogic_Slower\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyPlayerTick\", ply)\n    end\nend)\n```\nReason: Calling `hook.Run` once avoids per-player hook dispatch overhead, table lookups, and vararg/setup costs every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12970,"startedAt":"2026-07-11T07:36:31.919Z","completedAt":"2026-07-11T07:36:44.892Z","answerBytes":417,"answerChars":417,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":173,"totalTokens":15079,"reasoningTokens":13,"cachedTokens":14336},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"MyHealthHUD\", function()\n    local hp = LocalPlayer():Health()\n\n    draw.SimpleText(hp, \"DermaLarge\", 32, 32, color_white)\n    draw.RoundedBox(4, 32, 72, hp * 2, 20, Color(200, 50, 50))\n    draw.SimpleText(hp .. \"%\", \"DermaDefaultBold\", 32, 100, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per frame to avoid three repeated Lua/C++ calls in the same `HUDPaint` pass.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"MyHealthHUD\", function()\n    local hp = LocalPlayer():Health()\n\n    draw.SimpleText(hp, \"DermaLarge\", 32, 32, color_white)\n    draw.RoundedBox(4, 32, 72, hp * 2, 20, Color(200, 50, 50))\n    draw.SimpleText(hp .. \"%\", \"DermaDefaultBold\", 32, 100, color_white)\nend)\n```\nReason: Cache `LocalPlayer():Health()` once per frame to avoid three repeated Lua/C++ calls in the same `HUDPaint` pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12665,"startedAt":"2026-07-11T07:36:32.484Z","completedAt":"2026-07-11T07:36:45.154Z","answerBytes":330,"answerChars":330,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14894,"completionTokens":129,"totalTokens":15023,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintExample\", function()\n    for i = 1, itemCount do\n        surface.SetDrawColor(COLOR_WHITE)\n        -- draw work here\n    end\nend)\n```\nReason: Reusing one cached `Color` avoids per-iteration allocation and function-call overhead in the hot paint loop.","model_patch":"```lua\nlocal COLOR_WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintExample\", function()\n    for i = 1, itemCount do\n        surface.SetDrawColor(COLOR_WHITE)\n        -- draw work here\n    end\nend)\n```\nReason: Reusing one cached `Color` avoids per-iteration allocation and function-call overhead in the hot paint loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12774,"startedAt":"2026-07-11T07:36:32.699Z","completedAt":"2026-07-11T07:36:45.475Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14894,"completionTokens":100,"totalTokens":14994,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    out[i] = sin(i * step)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop, which is slightly faster in Lua.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    out[i] = sin(i * step)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated global/table lookups inside the hot loop, which is slightly faster in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13635,"startedAt":"2026-07-11T07:36:32.796Z","completedAt":"2026-07-11T07:36:46.436Z","answerBytes":559,"answerChars":559,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":187,"totalTokens":15084,"reasoningTokens":22,"cachedTokens":14336},"finalResponse":"```lua\nlocal lp\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n        if not IsValid(lp) then return end\n    end\n\n    local pos = lp:GetPos()\n    local vel = lp:GetVelocity()\n\n    -- use pos / vel / lp here\nend)\n```\nReason: Cache the `LocalPlayer()` result and refresh only when needed so hot-path code reuses one local reference instead of repeating a global function lookup and player resolution every time.","model_patch":"```lua\nlocal lp\n\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\nhook.Add(\"Think\", \"UseCachedLocalPlayer\", function()\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n        if not IsValid(lp) then return end\n    end\n\n    local pos = lp:GetPos()\n    local vel = lp:GetVelocity()\n\n    -- use pos / vel / lp here\nend)\n```\nReason: Cache the `LocalPlayer()` result and refresh only when needed so hot-path code reuses one local reference instead of repeating a global function lookup and player resolution every time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":13924,"startedAt":"2026-07-11T07:36:32.845Z","completedAt":"2026-07-11T07:36:46.771Z","answerBytes":565,"answerChars":565,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14915,"completionTokens":191,"totalTokens":15106,"reasoningTokens":27,"cachedTokens":14336},"finalResponse":"```lua\nlocal function PlayersRoughlyLookingAtEachOther(plyA, plyB, minFacingDot)\n    minFacingDot = minFacingDot or 0.8 -- ~36.9 degrees tolerance\n\n    local a = plyA:GetAimVector()\n    local b = plyB:GetAimVector()\n\n    -- If aim directions face each other, their normalized vectors point in opposite directions.\n    return a:Dot(b) <= -minFacingDot\nend\n```\nReason: `GetAimVector()` is already normalized, so a single dot-product threshold avoids `math.acos` and gives a cheap facing check based on whether the two aim directions point roughly opposite each other.","model_patch":"```lua\nlocal function PlayersRoughlyLookingAtEachOther(plyA, plyB, minFacingDot)\n    minFacingDot = minFacingDot or 0.8 -- ~36.9 degrees tolerance\n\n    local a = plyA:GetAimVector()\n    local b = plyB:GetAimVector()\n\n    -- If aim directions face each other, their normalized vectors point in opposite directions.\n    return a:Dot(b) <= -minFacingDot\nend\n```\nReason: `GetAimVector()` is already normalized, so a single dot-product threshold avoids `math.acos` and gives a cheap facing check based on whether the two aim directions point roughly opposite each other."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17896,"startedAt":"2026-07-11T07:36:33.023Z","completedAt":"2026-07-11T07:36:50.943Z","answerBytes":244,"answerChars":244,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14905,"completionTokens":207,"totalTokens":15112,"reasoningTokens":133,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally the better choice for a helper you control because it avoids the extra table field method lookup and communicates that this is a plain helper, not object state/behavior on `ply`.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally the better choice for a helper you control because it avoids the extra table field method lookup and communicates that this is a plain helper, not object state/behavior on `ply`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25082,"startedAt":"2026-07-11T07:36:33.127Z","completedAt":"2026-07-11T07:36:58.216Z","answerBytes":162,"answerChars":162,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":140,"totalTokens":15036,"reasoningTokens":80,"cachedTokens":14336},"finalResponse":"```lua\nMsgN(\"hot path debug\")\n```\nReason: `MsgN` writes directly to the console with less overhead than `print`, making it a better fit for hot-path debug output.","model_patch":"```lua\nMsgN(\"hot path debug\")\n```\nReason: `MsgN` writes directly to the console with less overhead than `print`, making it a better fit for hot-path debug output."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12307,"startedAt":"2026-07-11T07:36:33.712Z","completedAt":"2026-07-11T07:36:46.022Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":99,"totalTokens":15005,"reasoningTokens":13,"cachedTokens":14336},"finalResponse":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: `numeric for` is the typical fastest choice for a large dense array because it avoids the extra iterator machinery of `pairs`/`ipairs` and indexes the sequential part directly.","model_patch":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: `numeric for` is the typical fastest choice for a large dense array because it avoids the extra iterator machinery of `pairs`/`ipairs` and indexes the sequential part directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17017,"startedAt":"2026-07-11T07:36:33.788Z","completedAt":"2026-07-11T07:36:50.945Z","answerBytes":599,"answerChars":599,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14916,"completionTokens":218,"totalTokens":15134,"reasoningTokens":39,"cachedTokens":0},"finalResponse":"```lua\n-- Faster than DarkRP's fn.Filter(...):Map(...) style by doing one pass,\n-- avoiding closure/combinator overhead and intermediate tables.\nlocal players = player.GetAll()\nlocal result = {}\nlocal out = 1\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Team() == TEAM_POLICE and ply:Alive() then\n        result[out] = ply:Nick()\n        out = out + 1\n    end\nend\n\nreturn result\n```\nReason: A single hand-written loop is faster because it fuses filter and map into one pass, avoids extra function calls/closures from `fn`, and does not allocate intermediate lists.","model_patch":"```lua\n-- Faster than DarkRP's fn.Filter(...):Map(...) style by doing one pass,\n-- avoiding closure/combinator overhead and intermediate tables.\nlocal players = player.GetAll()\nlocal result = {}\nlocal out = 1\n\nfor i = 1, #players do\n    local ply = players[i]\n\n    if IsValid(ply) and ply:Team() == TEAM_POLICE and ply:Alive() then\n        result[out] = ply:Nick()\n        out = out + 1\n    end\nend\n\nreturn result\n```\nReason: A single hand-written loop is faster because it fuses filter and map into one pass, avoids extra function calls/closures from `fn`, and does not allocate intermediate lists."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16967,"startedAt":"2026-07-11T07:36:33.973Z","completedAt":"2026-07-11T07:36:50.944Z","answerBytes":726,"answerChars":726,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14915,"completionTokens":216,"totalTokens":15131,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nlocal function refreshPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\nhook.Add(\"InitPostEntity\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\n\nhook.Add(\"Think\", \"MyAddon.FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates and walks the full player list every tick, so caching removes repeated table creation and only rebuilds the list when membership changes.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nlocal function refreshPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\nhook.Add(\"InitPostEntity\", \"MyAddon.RefreshPlayerCache\", refreshPlayers)\n\nhook.Add(\"Think\", \"MyAddon.FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player work here\n        end\n    end\nend)\n```\nReason: `player.GetAll()` allocates and walks the full player list every tick, so caching removes repeated table creation and only rebuilds the list when membership changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16942,"startedAt":"2026-07-11T07:36:33.995Z","completedAt":"2026-07-11T07:36:50.946Z","answerBytes":646,"answerChars":646,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":272,"totalTokens":15170,"reasoningTokens":78,"cachedTokens":14336},"finalResponse":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTempValue(ply, value)\n    local slot = playerData[ply]\n    if slot == nil then\n        slot = {}\n        playerData[ply] = slot\n    end\n\n    slot.someField = value\nend\n\nlocal function GetTempValue(ply)\n    local slot = playerData[ply]\n    return slot and slot.someField or nil\nend\n\nhook.Add(\"PlayerDisconnected\", \"CleanupTempValue\", function(ply)\n    playerData[ply] = nil\nend)\n```\nReason: A plain side-table lookup avoids hitting the player entity table/metatable path on every read, and weak keys keep temporary per-player state cheap to read and easy to clean up.","model_patch":"```lua\nlocal playerData = setmetatable({}, { __mode = \"k\" })\n\nlocal function SetTempValue(ply, value)\n    local slot = playerData[ply]\n    if slot == nil then\n        slot = {}\n        playerData[ply] = slot\n    end\n\n    slot.someField = value\nend\n\nlocal function GetTempValue(ply)\n    local slot = playerData[ply]\n    return slot and slot.someField or nil\nend\n\nhook.Add(\"PlayerDisconnected\", \"CleanupTempValue\", function(ply)\n    playerData[ply] = nil\nend)\n```\nReason: A plain side-table lookup avoids hitting the player entity table/metatable path on every read, and weak keys keep temporary per-player state cheap to read and easy to clean up."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12568,"startedAt":"2026-07-11T07:36:34.211Z","completedAt":"2026-07-11T07:36:46.834Z","answerBytes":316,"answerChars":316,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":133,"totalTokens":15034,"reasoningTokens":30,"cachedTokens":14336},"finalResponse":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\", \"delta\" }\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n```\nReason: Sequential number-indexed arrays iterate faster in Garry's Mod Lua because they use the table's array part with simpler numeric access, while string-keyed maps require hash lookup.","model_patch":"```lua\nlocal values = { \"alpha\", \"beta\", \"gamma\", \"delta\" }\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n```\nReason: Sequential number-indexed arrays iterate faster in Garry's Mod Lua because they use the table's array part with simpler numeric access, while string-keyed maps require hash lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12352,"startedAt":"2026-07-11T07:36:34.439Z","completedAt":"2026-07-11T07:36:46.802Z","answerBytes":166,"answerChars":166,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":84,"totalTokens":14990,"reasoningTokens":21,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw numeric RGBA avoids the extra table/object access and is the faster style for a hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw numeric RGBA avoids the extra table/object access and is the faster style for a hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16226,"startedAt":"2026-07-11T07:36:34.657Z","completedAt":"2026-07-11T07:36:50.943Z","answerBytes":333,"answerChars":333,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14922,"completionTokens":123,"totalTokens":15045,"reasoningTokens":24,"cachedTokens":14336},"finalResponse":"```lua\nlocal row = sql.QueryRow(\"SELECT coins FROM players WHERE steamid = \" .. sql.SQLStr(steamId))\nif row then\n    local coins = tonumber(row.coins) or 0\nend\n```\nReason: For one Garry's Mod server with no cross-server sync, local SQLite is typically lower latency because it avoids network round trips and remote database overhead.","model_patch":"```lua\nlocal row = sql.QueryRow(\"SELECT coins FROM players WHERE steamid = \" .. sql.SQLStr(steamId))\nif row then\n    local coins = tonumber(row.coins) or 0\nend\n```\nReason: For one Garry's Mod server with no cross-server sync, local SQLite is typically lower latency because it avoids network round trips and remote database overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6795,"startedAt":"2026-07-11T07:36:34.965Z","completedAt":"2026-07-11T07:36:41.879Z","answerBytes":782,"answerChars":782,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":234,"totalTokens":15131,"reasoningTokens":0,"cachedTokens":0},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- hot path\nlocal function DoWork(players)\n    for i = 1, #players do\n        local ply = players[i]\n        local steamId = GetSteamIDCached(ply)\n        -- use steamId\n    end\nend\n```\nReason: It computes `ply:SteamID()` once per player and reuses the stored string on the hot path, avoiding repeated method calls and allocations while letting weak keys and disconnect cleanup release stale entries.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local steamId = steamIdCache[ply]\n    if steamId ~= nil then\n        return steamId\n    end\n\n    steamId = ply:SteamID()\n    steamIdCache[ply] = steamId\n    return steamId\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearSteamIDCache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- hot path\nlocal function DoWork(players)\n    for i = 1, #players do\n        local ply = players[i]\n        local steamId = GetSteamIDCached(ply)\n        -- use steamId\n    end\nend\n```\nReason: It computes `ply:SteamID()` once per player and reuses the stored string on the hot path, avoiding repeated method calls and allocations while letting weak keys and disconnect cleanup release stale entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15360,"startedAt":"2026-07-11T07:36:35.569Z","completedAt":"2026-07-11T07:36:50.944Z","answerBytes":273,"answerChars":273,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":117,"totalTokens":15017,"reasoningTokens":21,"cachedTokens":14336},"finalResponse":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal big = table.concat(parts)\n```\nReason: `table.concat` is faster because repeated `..` rebuilds and copies the growing string on each append, while `table.concat` joins all pieces in one pass.","model_patch":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[i] = \"piece\" .. i\nend\n\nlocal big = table.concat(parts)\n```\nReason: `table.concat` is faster because repeated `..` rebuilds and copies the growing string on each append, while `table.concat` joins all pieces in one pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15251,"startedAt":"2026-07-11T07:36:35.667Z","completedAt":"2026-07-11T07:36:50.946Z","answerBytes":217,"answerChars":217,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":100,"totalTokens":15004,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids `draw.RoundedBox`'s extra wrapper and corner logic, so it is slightly faster for plain non-rounded rectangles.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` avoids `draw.RoundedBox`'s extra wrapper and corner logic, so it is slightly faster for plain non-rounded rectangles."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15321,"startedAt":"2026-07-11T07:36:36.159Z","completedAt":"2026-07-11T07:36:51.526Z","answerBytes":609,"answerChars":609,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":289,"totalTokens":15190,"reasoningTokens":99,"cachedTokens":14336},"finalResponse":"```lua\nlocal font = \"BudgetLabel\"\nlocal text = \"FPS: 144\"\nlocal x, y = 24, 24\nlocal color_white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color_white)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` is the leanest path for one single-line string each frame; `draw.DrawText` adds wrapping/alignment handling you do not need, and `draw.SimpleTextOutlined` is slower again because it performs extra outline draws.","model_patch":"```lua\nlocal font = \"BudgetLabel\"\nlocal text = \"FPS: 144\"\nlocal x, y = 24, 24\nlocal color_white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color_white)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` is the leanest path for one single-line string each frame; `draw.DrawText` adds wrapping/alignment handling you do not need, and `draw.SimpleTextOutlined` is slower again because it performs extra outline draws."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14248,"startedAt":"2026-07-11T07:36:36.660Z","completedAt":"2026-07-11T07:36:50.944Z","answerBytes":151,"answerChars":151,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14893,"completionTokens":58,"totalTokens":14951,"reasoningTokens":0,"cachedTokens":14336},"finalResponse":"```lua\nlocal len = #tbl\n```\nReason: `#` is the idiomatic and fastest way to get the length of a contiguous 1-based array-like table in Garry's Mod Lua.","model_patch":"```lua\nlocal len = #tbl\n```\nReason: `#` is the idiomatic and fastest way to get the length of a contiguous 1-based array-like table in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13213,"startedAt":"2026-07-11T07:36:37.632Z","completedAt":"2026-07-11T07:36:50.946Z","answerBytes":270,"answerChars":270,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":161,"totalTokens":15061,"reasoningTokens":82,"cachedTokens":14336},"finalResponse":"```lua\n-- Faster when you can replace the table reference.\nt = {}\n```\nReason: `t = {}` is generally faster because it creates a new table in constant time, while `table.Empty(t)` walks and clears the existing array/hash contents, which is proportional to the table size.","model_patch":"```lua\n-- Faster when you can replace the table reference.\nt = {}\n```\nReason: `t = {}` is generally faster because it creates a new table in constant time, while `table.Empty(t)` walks and clears the existing array/hash contents, which is proportional to the table size."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13959,"startedAt":"2026-07-11T07:36:38.660Z","completedAt":"2026-07-11T07:36:52.647Z","answerBytes":363,"answerChars":363,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":162,"totalTokens":15060,"reasoningTokens":35,"cachedTokens":14336},"finalResponse":"```lua\nlocal allowed = {\n    foo = true,\n    bar = true,\n    baz = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n\n-- Slower list scan:\n-- if table.HasValue({ \"foo\", \"bar\", \"baz\" }, value) then ... end\n```\nReason: `allowed[value]` is a direct hash-table lookup, while `table.HasValue` scans the list linearly and gets slower as the list grows.","model_patch":"```lua\nlocal allowed = {\n    foo = true,\n    bar = true,\n    baz = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n\n-- Slower list scan:\n-- if table.HasValue({ \"foo\", \"bar\", \"baz\" }, value) then ... end\n```\nReason: `allowed[value]` is a direct hash-table lookup, while `table.HasValue` scans the list linearly and gets slower as the list grows."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13494,"startedAt":"2026-07-11T07:36:39.796Z","completedAt":"2026-07-11T07:36:53.313Z","answerBytes":396,"answerChars":396,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":182,"totalTokens":15079,"reasoningTokens":52,"cachedTokens":14336},"finalResponse":"```lua\n-- Faster: put known fields directly in the constructor\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create empty table, then assign each field\nlocal u = {}\nu.x = 1\nu.y = 2\nu.z = 3\n```\nReason: For a small table with known fields, the table constructor is faster because it creates and initializes the table in one step, avoiding multiple separate field assignment operations.","model_patch":"```lua\n-- Faster: put known fields directly in the constructor\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create empty table, then assign each field\nlocal u = {}\nu.x = 1\nu.y = 2\nu.z = 3\n```\nReason: For a small table with known fields, the table constructor is faster because it creates and initializes the table in one step, avoiding multiple separate field assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21236,"startedAt":"2026-07-11T07:36:40.872Z","completedAt":"2026-07-11T07:37:02.110Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14895,"completionTokens":104,"totalTokens":14999,"reasoningTokens":38,"cachedTokens":14336},"finalResponse":"```lua\nlocal value = list[math.random(#list)]\n```\nReason: For a sequential table, direct indexed access avoids `table.Random`'s extra work for generic tables and uses the array length in O(1).","model_patch":"```lua\nlocal value = list[math.random(#list)]\n```\nReason: For a sequential table, direct indexed access avoids `table.Random`'s extra work for generic tables and uses the array length in O(1)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":35035,"startedAt":"2026-07-11T07:36:41.057Z","completedAt":"2026-07-11T07:37:16.094Z","answerBytes":128,"answerChars":128,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14890,"completionTokens":85,"totalTokens":14975,"reasoningTokens":33,"cachedTokens":14336},"finalResponse":"```lua\nlocal y = x * x\n```\nReason: `x * x` avoids the exponent operator overhead and is the preferred fast form in a tight loop.","model_patch":"```lua\nlocal y = x * x\n```\nReason: `x * x` avoids the exponent operator overhead and is the preferred fast form in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4@medium","model_name_or_path":"gpt-5.4@medium","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":11660,"startedAt":"2026-07-11T07:36:41.881Z","completedAt":"2026-07-11T07:36:53.543Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":82,"totalTokens":14988,"reasoningTokens":20,"cachedTokens":14336},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- your code here\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`. ","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- your code here\nend\n```\nReason: `player.Iterator()` iterates connected players directly without allocating the table returned by `player.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16314,"startedAt":"2026-07-11T07:36:42.921Z","completedAt":"2026-07-11T07:36:59.240Z","answerBytes":271,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":358,"totalTokens":15255,"reasoningTokens":267,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so it avoids materializing a full table like `ents.GetAll()` or `ents.FindByClass()` first.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` streams entities one by one, so it avoids materializing a full table like `ents.GetAll()` or `ents.FindByClass()` first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":12915,"startedAt":"2026-07-11T07:36:43.281Z","completedAt":"2026-07-11T07:36:56.206Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14903,"completionTokens":151,"totalTokens":15054,"reasoningTokens":70,"cachedTokens":14336},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- per-frame logic here\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook under the identifier `MyAddon.Think`, so it runs every think tick.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- per-frame logic here\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook under the identifier `MyAddon.Think`, so it runs every think tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":13882,"startedAt":"2026-07-11T07:36:43.766Z","completedAt":"2026-07-11T07:36:57.666Z","answerBytes":232,"answerChars":232,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":168,"totalTokens":15064,"reasoningTokens":93,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` checks that the reference exists and the entity has not been removed, which is the standard safe guard before calling entity methods in Garry's Mod Lua.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\nReason: `IsValid(ent)` checks that the reference exists and the entity has not been removed, which is the standard safe guard before calling entity methods in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13143,"startedAt":"2026-07-11T07:36:44.243Z","completedAt":"2026-07-11T07:36:57.399Z","answerBytes":220,"answerChars":220,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14889,"completionTokens":136,"totalTokens":15025,"reasoningTokens":64,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers the server/client-side callback that runs when a `MyAddon.Sync` net message arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here.\nend)\n```\nReason: `net.Receive` registers the server/client-side callback that runs when a `MyAddon.Sync` net message arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":22169,"startedAt":"2026-07-11T07:36:44.909Z","completedAt":"2026-07-11T07:37:07.127Z","answerBytes":333,"answerChars":333,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":627,"totalTokens":15524,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\n-- Slower in a hot path:\n-- local ang = Angle()\n\nlocal scratchAng = Angle()\n\nlocal function getZeroedAngleScratch()\n    scratchAng:SetUnpacked(0, 0, 0)\n    return scratchAng\nend\n```\nReason: Reusing a preallocated `Angle` and zeroing it avoids per-call allocation and GC, which is faster than constructing `Angle()` every time.","model_patch":"```lua\n-- Slower in a hot path:\n-- local ang = Angle()\n\nlocal scratchAng = Angle()\n\nlocal function getZeroedAngleScratch()\n    scratchAng:SetUnpacked(0, 0, 0)\n    return scratchAng\nend\n```\nReason: Reusing a preallocated `Angle` and zeroing it avoids per-call allocation and GC, which is faster than constructing `Angle()` every time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15220,"startedAt":"2026-07-11T07:36:45.165Z","completedAt":"2026-07-11T07:37:00.388Z","answerBytes":230,"answerChars":230,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":266,"totalTokens":15170,"reasoningTokens":190,"cachedTokens":0},"finalResponse":"```lua\nlocal MYADDON_COLOR = myaddon.config.color\nlocal color = MYADDON_COLOR\n```\nReason: A local variable is fastest to read in Lua; `myaddon.config.color` does table lookups each access, and a global is also slower than a local.","model_patch":"```lua\nlocal MYADDON_COLOR = myaddon.config.color\nlocal color = MYADDON_COLOR\n```\nReason: A local variable is fastest to read in Lua; `myaddon.config.color` does table lookups each access, and a global is also slower than a local."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15809,"startedAt":"2026-07-11T07:36:45.479Z","completedAt":"2026-07-11T07:37:01.295Z","answerBytes":391,"answerChars":389,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":249,"totalTokens":15147,"reasoningTokens":132,"cachedTokens":14336},"finalResponse":"```lua\n-- Preferred in DarkRP\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid relying on the raw NWString directly\nlocal oldJobName = ply:GetNWString(\"job\")\n```\nReason: `ply:getDarkRPVar(\"job\")` is DarkRP’s intended abstraction for DarkRP-owned player state, so it is clearer, more compatible with DarkRP internals, and less brittle than reading the underlying networked string directly.","model_patch":"```lua\n-- Preferred in DarkRP\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Avoid relying on the raw NWString directly\nlocal oldJobName = ply:GetNWString(\"job\")\n```\nReason: `ply:getDarkRPVar(\"job\")` is DarkRP’s intended abstraction for DarkRP-owned player state, so it is clearer, more compatible with DarkRP internals, and less brittle than reading the underlying networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14466,"startedAt":"2026-07-11T07:36:45.479Z","completedAt":"2026-07-11T07:36:59.971Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":179,"totalTokens":15078,"reasoningTokens":93,"cachedTokens":14336},"finalResponse":"```lua\nlocal maxDistance = 300\n\nif vecA:DistToSqr(vecB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root from `Distance`, so it is the preferred method for faster threshold-only comparisons.","model_patch":"```lua\nlocal maxDistance = 300\n\nif vecA:DistToSqr(vecB) <= maxDistance * maxDistance then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root from `Distance`, so it is the preferred method for faster threshold-only comparisons."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":24716,"startedAt":"2026-07-11T07:36:46.026Z","completedAt":"2026-07-11T07:37:10.745Z","answerBytes":362,"answerChars":362,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14895,"completionTokens":604,"totalTokens":15499,"reasoningTokens":501,"cachedTokens":14336},"finalResponse":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- use ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- fallback for older environments\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to visit every entity, and the fallback keeps the code working where that iterator is unavailable.","model_patch":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- use ent\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- fallback for older environments\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to visit every entity, and the fallback keeps the code working where that iterator is unavailable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":11303,"startedAt":"2026-07-11T07:36:46.359Z","completedAt":"2026-07-11T07:36:57.664Z","answerBytes":426,"answerChars":422,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14914,"completionTokens":310,"totalTokens":15224,"reasoningTokens":180,"cachedTokens":0},"finalResponse":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if IsValid(ent) and ent ~= ply then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast default for “near player” queries in server Lua benchmarks because it directly matches a radial proximity check without the heavier visibility-oriented cost of `FindInPVS`.","model_patch":"```lua\nlocal radius = 512\nlocal nearby = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if IsValid(ent) and ent ~= ply then\n        -- use ent\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast default for “near player” queries in server Lua benchmarks because it directly matches a radial proximity check without the heavier visibility-oriented cost of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22999,"startedAt":"2026-07-11T07:36:46.463Z","completedAt":"2026-07-11T07:37:09.727Z","answerBytes":598,"answerChars":598,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":698,"totalTokens":15604,"reasoningTokens":513,"cachedTokens":14336},"finalResponse":"```lua\nlocal function FindPlayersInRadius(pos, radius, out)\n    out = out or {}\n\n    local count = 0\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            out[count] = ply\n        end\n    end\n\n    for i = count + 1, #out do\n        out[i] = nil\n    end\n\n    return out\nend\n```\nReason: This only scans players instead of every entity and uses squared-distance checks to avoid the extra entity search and square-root work.","model_patch":"```lua\nlocal function FindPlayersInRadius(pos, radius, out)\n    out = out or {}\n\n    local count = 0\n    local radiusSqr = radius * radius\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            count = count + 1\n            out[count] = ply\n        end\n    end\n\n    for i = count + 1, #out do\n        out[i] = nil\n    end\n\n    return out\nend\n```\nReason: This only scans players instead of every entity and uses squared-distance checks to avoid the extra entity search and square-root work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9615,"startedAt":"2026-07-11T07:36:46.833Z","completedAt":"2026-07-11T07:37:00.777Z","answerBytes":268,"answerChars":268,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":216,"totalTokens":15117,"reasoningTokens":129,"cachedTokens":14336},"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the counter and limit handling are built into the VM, avoiding the extra increment and condition work of a manual `while` loop.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the counter and limit handling are built into the VM, avoiding the extra increment and condition work of a manual `while` loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":12415,"startedAt":"2026-07-11T07:36:50.917Z","completedAt":"2026-07-11T07:37:03.565Z","answerBytes":772,"answerChars":772,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14909,"completionTokens":347,"totalTokens":15256,"reasoningTokens":125,"cachedTokens":14336},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, handlers loop players internally.\nhook.Add(\"Tick\", \"MyPerTickNotifier\", function()\n    hook.Run(\"MyPlayersTick\", player.GetAll())\nend)\n\nhook.Add(\"MyPlayersTick\", \"MyCustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- per-player custom logic here\n    end\nend)\n\n-- Slower: repeated hook dispatch per player every tick.\nhook.Add(\"Tick\", \"MyPerPlayerNotifier\", function()\n    local players = player.GetAll()\n    for i = 1, #players do\n        hook.Run(\"MyPlayerTick\", players[i])\n    end\nend)\n```\nReason: Calling `hook.Run` once avoids repeated hook table lookup, vararg packing, and callback dispatch per player, so the per-player loop should live inside the hook handler instead.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, handlers loop players internally.\nhook.Add(\"Tick\", \"MyPerTickNotifier\", function()\n    hook.Run(\"MyPlayersTick\", player.GetAll())\nend)\n\nhook.Add(\"MyPlayersTick\", \"MyCustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- per-player custom logic here\n    end\nend)\n\n-- Slower: repeated hook dispatch per player every tick.\nhook.Add(\"Tick\", \"MyPerPlayerNotifier\", function()\n    local players = player.GetAll()\n    for i = 1, #players do\n        hook.Run(\"MyPlayerTick\", players[i])\n    end\nend)\n```\nReason: Calling `hook.Run` once avoids repeated hook table lookup, vararg packing, and callback dispatch per player, so the per-player loop should live inside the hook handler instead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9718,"startedAt":"2026-07-11T07:36:50.930Z","completedAt":"2026-07-11T07:37:00.876Z","answerBytes":491,"answerChars":491,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":272,"totalTokens":15178,"reasoningTokens":97,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local lp = LocalPlayer()\n    local health = lp:Health()\n\n    draw.SimpleText(health, \"Trebuchet24\", 20, 20, color_white)\n    surface.SetDrawColor(255, 0, 0, 255)\n    surface.DrawRect(20, 50, health * 2, 16)\n    draw.SimpleText(health .. \"%\", \"Trebuchet18\", 20, 72, color_white)\nend)\n```\nReason: it avoids repeating `LocalPlayer()` and `:Health()` lookups in the same frame by caching the value once and reusing it for all three draws.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local lp = LocalPlayer()\n    local health = lp:Health()\n\n    draw.SimpleText(health, \"Trebuchet24\", 20, 20, color_white)\n    surface.SetDrawColor(255, 0, 0, 255)\n    surface.DrawRect(20, 50, health * 2, 16)\n    draw.SimpleText(health .. \"%\", \"Trebuchet18\", 20, 72, color_white)\nend)\n```\nReason: it avoids repeating `LocalPlayer()` and `:Health()` lookups in the same frame by caching the value once and reusing it for all three draws."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9933,"startedAt":"2026-07-11T07:36:51.060Z","completedAt":"2026-07-11T07:37:01.120Z","answerBytes":305,"answerChars":305,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14894,"completionTokens":249,"totalTokens":15143,"reasoningTokens":134,"cachedTokens":14336},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyFastPaint\", function()\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 1000 do\n        surface.DrawRect(i, i, 4, 4)\n    end\nend)\n```\nReason: Reusing one prebuilt `Color` avoids allocating and initializing a new table every loop iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyFastPaint\", function()\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 1000 do\n        surface.DrawRect(i, i, 4, 4)\n    end\nend)\n```\nReason: Reusing one prebuilt `Color` avoids allocating and initializing a new table every loop iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6944,"startedAt":"2026-07-11T07:36:51.069Z","completedAt":"2026-07-11T07:36:58.171Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":128,"totalTokens":15024,"reasoningTokens":44,"cachedTokens":14336},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local y = sin(i * 0.1)\n    -- hot loop work\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups on `math` inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local y = sin(i * 0.1)\n    -- hot loop work\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table lookups on `math` inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14976,"startedAt":"2026-07-11T07:36:51.073Z","completedAt":"2026-07-11T07:37:06.195Z","answerBytes":574,"answerChars":574,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":580,"totalTokens":15479,"reasoningTokens":408,"cachedTokens":14336},"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal lp\n\nlocal function GetLocalPlayerCached()\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n    end\n\n    return lp\nend\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    local ply = GetLocalPlayerCached()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local armor = ply:Armor()\n    -- use ply, hp, armor here\nend)\n```\nReason: This localizes the global `LocalPlayer` lookup and reuses the resolved player entity, so hot code paths avoid repeated global table lookups and repeated `LocalPlayer()` calls.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal lp\n\nlocal function GetLocalPlayerCached()\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n    end\n\n    return lp\nend\n\nhook.Add(\"HUDPaint\", \"Example\", function()\n    local ply = GetLocalPlayerCached()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local armor = ply:Armor()\n    -- use ply, hp, armor here\nend)\n```\nReason: This localizes the global `LocalPlayer` lookup and reuses the resolved player entity, so hot code paths avoid repeated global table lookups and repeated `LocalPlayer()` calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":16124,"startedAt":"2026-07-11T07:36:51.087Z","completedAt":"2026-07-11T07:37:07.354Z","answerBytes":467,"answerChars":467,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14913,"completionTokens":664,"totalTokens":15577,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal function AreAimDirectionsFacingEachOther(plyA, plyB, minOpposedDot)\n    minOpposedDot = minOpposedDot or 0.8 -- about 37 degrees from perfectly opposite\n\n    local dot = plyA:GetAimVector():Dot(plyB:GetAimVector())\n    return dot <= -minOpposedDot\nend\n```\nReason: `GetAimVector()` is already normalized, so one dot product gives a cheap cosine-space test; values near `-1` mean the players' aim directions are facing each other, with no `math.acos` cost.","model_patch":"```lua\nlocal function AreAimDirectionsFacingEachOther(plyA, plyB, minOpposedDot)\n    minOpposedDot = minOpposedDot or 0.8 -- about 37 degrees from perfectly opposite\n\n    local dot = plyA:GetAimVector():Dot(plyB:GetAimVector())\n    return dot <= -minOpposedDot\nend\n```\nReason: `GetAimVector()` is already normalized, so one dot product gives a cheap cosine-space test; values near `-1` mean the players' aim directions are facing each other, with no `math.acos` cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11845,"startedAt":"2026-07-11T07:36:51.095Z","completedAt":"2026-07-11T07:37:03.157Z","answerBytes":212,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14903,"completionTokens":402,"totalTokens":15305,"reasoningTokens":333,"cachedTokens":0},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally the faster and better default for a helper you control because it avoids method-style lookup on `ply`/its metatable and can stay a local function.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally the faster and better default for a helper you control because it avoids method-style lookup on `ply`/its metatable and can stay a local function."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13118,"startedAt":"2026-07-11T07:36:51.102Z","completedAt":"2026-07-11T07:37:04.361Z","answerBytes":235,"answerChars":235,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":473,"totalTokens":15371,"reasoningTokens":390,"cachedTokens":14336},"finalResponse":"```lua\nMsgN(\"[debug] hot path hit: \", entIndex, \" frame=\", FrameNumber())\n```\nReason: `MsgN` is cheaper than `print` in Garry's Mod because it writes directly to the console with less formatting overhead, so it is better for hot paths.","model_patch":"```lua\nMsgN(\"[debug] hot path hit: \", entIndex, \" frame=\", FrameNumber())\n```\nReason: `MsgN` is cheaper than `print` in Garry's Mod because it writes directly to the console with less formatting overhead, so it is better for hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8280,"startedAt":"2026-07-11T07:36:51.110Z","completedAt":"2026-07-11T07:36:59.519Z","answerBytes":250,"answerChars":250,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":207,"totalTokens":15115,"reasoningTokens":119,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: Numeric `for` is typically fastest for large dense arrays in Garry's Mod Lua because it does direct indexed access and avoids the extra iterator overhead of `pairs` and `ipairs`.","model_patch":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: Numeric `for` is typically fastest for large dense arrays in Garry's Mod Lua because it does direct indexed access and avoids the extra iterator overhead of `pairs` and `ipairs`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16884,"startedAt":"2026-07-11T07:36:51.115Z","completedAt":"2026-07-11T07:37:08.118Z","answerBytes":591,"answerChars":591,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14914,"completionTokens":695,"totalTokens":15609,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal playerGetAll = player.GetAll\n\nlocal function aliveCitizenNames()\n    local players = playerGetAll()\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:getDarkRPVar(\"job\") == \"Citizen\" then\n            n = n + 1\n            out[n] = ply:Nick():upper()\n        end\n    end\n\n    return out\nend\n```\nReason: A single indexed loop is faster than DarkRP `fn` filter/map chains because it avoids extra function calls, closures, and intermediate tables while doing the same transform in one pass.","model_patch":"```lua\nlocal playerGetAll = player.GetAll\n\nlocal function aliveCitizenNames()\n    local players = playerGetAll()\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:getDarkRPVar(\"job\") == \"Citizen\" then\n            n = n + 1\n            out[n] = ply:Nick():upper()\n        end\n    end\n\n    return out\nend\n```\nReason: A single indexed loop is faster than DarkRP `fn` filter/map chains because it avoids extra function calls, closures, and intermediate tables while doing the same transform in one pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16497,"startedAt":"2026-07-11T07:36:51.133Z","completedAt":"2026-07-11T07:37:07.747Z","answerBytes":731,"answerChars":731,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14913,"completionTokens":723,"totalTokens":15636,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"Tick\", \"MyAddon.FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n``` \nReason: `player.GetAll()` allocates and walks the full player list every tick; caching moves that cost to join/leave events and keeps the hot `Tick` path to a tight indexed loop.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", function()\n    RefreshPlayerCache()\nend)\n\nhook.Add(\"Tick\", \"MyAddon.FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player tick work here\n        end\n    end\nend)\n``` \nReason: `player.GetAll()` allocates and walks the full player list every tick; caching moves that cost to join/leave events and keeps the hot `Tick` path to a tight indexed loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":13016,"startedAt":"2026-07-11T07:36:51.140Z","completedAt":"2026-07-11T07:37:04.337Z","answerBytes":475,"answerChars":475,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":436,"totalTokens":15334,"reasoningTokens":279,"cachedTokens":14336},"finalResponse":"```lua\nlocal hotDataByPlayerId = {}\n\nlocal function SetHotData(ply, value)\n    hotDataByPlayerId[ply:EntIndex()] = value\nend\n\nlocal function GetHotData(ply)\n    return hotDataByPlayerId[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearHotData\", function(ply)\n    hotDataByPlayerId[ply:EntIndex()] = nil\nend)\n```\nReason: A plain Lua table keyed by `ply:EntIndex()` avoids userdata/metatable field access on `ply.someField`, so repeated reads are cheaper in hot paths.","model_patch":"```lua\nlocal hotDataByPlayerId = {}\n\nlocal function SetHotData(ply, value)\n    hotDataByPlayerId[ply:EntIndex()] = value\nend\n\nlocal function GetHotData(ply)\n    return hotDataByPlayerId[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearHotData\", function(ply)\n    hotDataByPlayerId[ply:EntIndex()] = nil\nend)\n```\nReason: A plain Lua table keyed by `ply:EntIndex()` avoids userdata/metatable field access on `ply.someField`, so repeated reads are cheaper in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11273,"startedAt":"2026-07-11T07:36:51.149Z","completedAt":"2026-07-11T07:37:02.597Z","answerBytes":345,"answerChars":345,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":356,"totalTokens":15257,"reasoningTokens":242,"cachedTokens":14336},"finalResponse":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n    \"delta\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate because Lua stores dense integer keys in the array part and a numeric `for` loop avoids the hash-table work of string-keyed maps.","model_patch":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n    \"delta\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays are faster to iterate because Lua stores dense integer keys in the array part and a numeric `for` loop avoids the hash-table work of string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7363,"startedAt":"2026-07-11T07:36:51.664Z","completedAt":"2026-07-11T07:36:59.156Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":187,"totalTokens":15093,"reasoningTokens":108,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw `r, g, b, a` numbers avoids the extra table/object access of a `Color` value, so it is the faster call style in a hot draw path.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing raw `r, g, b, a` numbers avoids the extra table/object access of a `Color` value, so it is the faster call style in a hot draw path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7489,"startedAt":"2026-07-11T07:36:52.675Z","completedAt":"2026-07-11T07:37:00.166Z","answerBytes":267,"answerChars":267,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14924,"completionTokens":212,"totalTokens":15136,"reasoningTokens":133,"cachedTokens":14336},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT money FROM players WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round trips and remote database overhead.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT money FROM players WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round trips and remote database overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17097,"startedAt":"2026-07-11T07:36:53.486Z","completedAt":"2026-07-11T07:37:10.924Z","answerBytes":604,"answerChars":604,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14895,"completionTokens":714,"totalTokens":15609,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal PLAYER = FindMetaTable(\"Player\")\n\nlocal function GetCachedSteamID(ply)\n    local sid = ply._cachedSteamID\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = PLAYER.SteamID(ply)\n    ply._cachedSteamID = sid\n    return sid\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    ply._cachedSteamID = nil\nend)\n\n-- hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetCachedSteamID(ply)\n    -- use sid\nend\n```\nReason: It turns repeated `ply:SteamID()` calls into one call per player and then reuses a cheap Lua field lookup on the hot path.","model_patch":"```lua\nlocal PLAYER = FindMetaTable(\"Player\")\n\nlocal function GetCachedSteamID(ply)\n    local sid = ply._cachedSteamID\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = PLAYER.SteamID(ply)\n    ply._cachedSteamID = sid\n    return sid\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearCachedSteamID\", function(ply)\n    ply._cachedSteamID = nil\nend)\n\n-- hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetCachedSteamID(ply)\n    -- use sid\nend\n```\nReason: It turns repeated `ply:SteamID()` calls into one call per player and then reuses a cheap Lua field lookup on the hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":7376,"startedAt":"2026-07-11T07:36:53.820Z","completedAt":"2026-07-11T07:37:01.326Z","answerBytes":495,"answerChars":495,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":230,"totalTokens":15128,"reasoningTokens":60,"cachedTokens":14336},"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"part\" .. i\nend\n\n-- Slow: repeated string reallocation/copying\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Fast: collect pieces, join once\nlocal fastParts = {}\nfor i = 1, #pieces do\n    fastParts[i] = pieces[i]\nend\nlocal fast = table.concat(fastParts)\n```\nReason: `table.concat` is faster because it joins all pieces in one pass instead of reallocating and copying the whole string on every `..` append.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"part\" .. i\nend\n\n-- Slow: repeated string reallocation/copying\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Fast: collect pieces, join once\nlocal fastParts = {}\nfor i = 1, #pieces do\n    fastParts[i] = pieces[i]\nend\nlocal fast = table.concat(fastParts)\n```\nReason: `table.concat` is faster because it joins all pieces in one pass instead of reallocating and copying the whole string on every `..` append."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6000,"startedAt":"2026-07-11T07:36:56.338Z","completedAt":"2026-07-11T07:37:02.598Z","answerBytes":277,"answerChars":277,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14902,"completionTokens":157,"totalTokens":15059,"reasoningTokens":63,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `draw.RoundedBox(0, ...)` adds wrapper overhead, while `surface.SetDrawColor` + `surface.DrawRect` is the direct non-rounded rectangle path and is slightly faster when called many times per frame.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `draw.RoundedBox(0, ...)` adds wrapper overhead, while `surface.SetDrawColor` + `surface.DrawRect` is the direct non-rounded rectangle path and is slightly faster when called many times per frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9900,"startedAt":"2026-07-11T07:36:57.467Z","completedAt":"2026-07-11T07:37:07.523Z","answerBytes":516,"answerChars":516,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":331,"totalTokens":15232,"reasoningTokens":147,"cachedTokens":14336},"finalResponse":"```lua\nlocal font = \"Trebuchet24\"\nlocal text = \"FPS: 144\"\nlocal x, y = 32, 32\nlocal r, g, b, a = 255, 255, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(r, g, b, a)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the leanest path for a single-line string; `draw.DrawText` adds wrapping/alignment work and `draw.SimpleTextOutlined` adds extra outline passes.","model_patch":"```lua\nlocal font = \"Trebuchet24\"\nlocal text = \"FPS: 144\"\nlocal x, y = 32, 32\nlocal r, g, b, a = 255, 255, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(r, g, b, a)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the leanest path for a single-line string; `draw.DrawText` adds wrapping/alignment work and `draw.SimpleTextOutlined` adds extra outline passes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6261,"startedAt":"2026-07-11T07:36:57.667Z","completedAt":"2026-07-11T07:37:03.933Z","answerBytes":182,"answerChars":182,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14893,"completionTokens":160,"totalTokens":15053,"reasoningTokens":96,"cachedTokens":14336},"finalResponse":"```lua\nlocal len = #tbl\n```\nReason: `#` is the preferred fast way to get the length of a sequential array-like table; `table.Count` is for counting all keys in non-sequential tables.","model_patch":"```lua\nlocal len = #tbl\n```\nReason: `#` is the preferred fast way to get the length of a sequential array-like table; `table.Count` is for counting all keys in non-sequential tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9114,"startedAt":"2026-07-11T07:36:57.667Z","completedAt":"2026-07-11T07:37:06.907Z","answerBytes":304,"answerChars":304,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":263,"totalTokens":15161,"reasoningTokens":179,"cachedTokens":14336},"finalResponse":"```lua\n-- Generally faster for repeatedly discarding a large sequential table:\nt = {}\n```\nReason: `t = {}` usually avoids walking and niling every existing element like `table.Empty(t)` does, so it is generally faster for large array-like tables when you do not need to preserve the same table reference.","model_patch":"```lua\n-- Generally faster for repeatedly discarding a large sequential table:\nt = {}\n```\nReason: `t = {}` usually avoids walking and niling every existing element like `table.Empty(t)` does, so it is generally faster for large array-like tables when you do not need to preserve the same table reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7122,"startedAt":"2026-07-11T07:36:58.278Z","completedAt":"2026-07-11T07:37:05.574Z","answerBytes":294,"answerChars":294,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":169,"totalTokens":15069,"reasoningTokens":72,"cachedTokens":14336},"finalResponse":"```lua\nlocal allowed = {\n    pistol = true,\n    shotgun = true,\n    smg1 = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: `table.HasValue` scans a list linearly, while a keyed lookup table uses direct key access and is much faster for repeated membership checks.","model_patch":"```lua\nlocal allowed = {\n    pistol = true,\n    shotgun = true,\n    smg1 = true,\n}\n\nif allowed[value] then\n    -- value exists in the set\nend\n```\nReason: `table.HasValue` scans a list linearly, while a keyed lookup table uses direct key access and is much faster for repeated membership checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9064,"startedAt":"2026-07-11T07:36:58.364Z","completedAt":"2026-07-11T07:37:07.524Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":295,"totalTokens":15194,"reasoningTokens":211,"cachedTokens":14336},"finalResponse":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: For a small table with known fields, the table constructor is faster because it creates and fills the table in one step instead of doing extra writes after `{}`.","model_patch":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: For a small table with known fields, the table constructor is faster because it creates and fills the table in one step instead of doing extra writes after `{}`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6357,"startedAt":"2026-07-11T07:36:59.239Z","completedAt":"2026-07-11T07:37:05.758Z","answerBytes":233,"answerChars":233,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14893,"completionTokens":179,"totalTokens":15072,"reasoningTokens":92,"cachedTokens":0},"finalResponse":"```lua\nlocal t = {\"a\", \"b\", \"c\", \"d\"}\nlocal v = t[math.random(#t)]\n```\nReason: For a sequential table, direct array indexing with `math.random(#t)` avoids the extra work `table.Random` does for non-array keys and is therefore faster.","model_patch":"```lua\nlocal t = {\"a\", \"b\", \"c\", \"d\"}\nlocal v = t[math.random(#t)]\n```\nReason: For a sequential table, direct array indexing with `math.random(#t)` avoids the extra work `table.Random` does for non-array keys and is therefore faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6557,"startedAt":"2026-07-11T07:36:59.373Z","completedAt":"2026-07-11T07:37:05.966Z","answerBytes":190,"answerChars":190,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14890,"completionTokens":145,"totalTokens":15035,"reasoningTokens":79,"cachedTokens":14336},"finalResponse":"```lua\nlocal y = x * x\n```\nReason: `x * x` is the fastest common form in a tight Lua loop because it uses direct multiplication and avoids the extra overhead of exponentiation like `x ^ 2`. ","model_patch":"```lua\nlocal y = x * x\n```\nReason: `x * x` is the fastest common form in a tight Lua loop because it uses direct multiplication and avoids the extra overhead of exponentiation like `x ^ 2`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4@high","model_name_or_path":"gpt-5.4@high","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":10954,"startedAt":"2026-07-11T07:36:59.538Z","completedAt":"2026-07-11T07:37:10.536Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":221,"totalTokens":15125,"reasoningTokens":159,"cachedTokens":14336},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates the currently connected players directly without first building a `player.GetAll()` table.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- ...\nend\n```\nReason: `player.Iterator()` iterates the currently connected players directly without first building a `player.GetAll()` table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20100,"startedAt":"2026-07-11T07:36:59.973Z","completedAt":"2026-07-11T07:37:20.076Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":936,"totalTokens":15837,"reasoningTokens":851,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` yields entities one at a time, so it does not build a full entity table like `ents.GetAll()`. ","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- use ent here\n    end\nend\n```\nReason: `ents.Iterator()` yields entities one at a time, so it does not build a full entity table like `ents.GetAll()`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":7151,"startedAt":"2026-07-11T07:37:00.226Z","completedAt":"2026-07-11T07:37:07.455Z","answerBytes":224,"answerChars":224,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14905,"completionTokens":184,"totalTokens":15089,"reasoningTokens":103,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- per-frame logic here\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook, and `MyAddon.Think` is the unique identifier for that callback.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- per-frame logic here\nend)\n```\nReason: `hook.Add` registers a function on Garry's Mod's `Think` hook, and `MyAddon.Think` is the unique identifier for that callback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":7268,"startedAt":"2026-07-11T07:37:00.403Z","completedAt":"2026-07-11T07:37:07.746Z","answerBytes":232,"answerChars":232,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":202,"totalTokens":15102,"reasoningTokens":125,"cachedTokens":0},"finalResponse":"```lua\nif not IsValid(ent) then return end\n\nent:SomeMethod()\n```\nReason: `IsValid(ent)` is the standard Garry's Mod guard for entity references and rejects `nil`, `NULL`, and removed/invalid entities before you call methods on them.","model_patch":"```lua\nif not IsValid(ent) then return end\n\nent:SomeMethod()\n```\nReason: `IsValid(ent)` is the standard Garry's Mod guard for entity references and rejects `nil`, `NULL`, and removed/invalid entities before you call methods on them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9284,"startedAt":"2026-07-11T07:37:00.873Z","completedAt":"2026-07-11T07:37:10.287Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14891,"completionTokens":339,"totalTokens":15230,"reasoningTokens":262,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming sync message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message, so this handler runs whenever `MyAddon.Sync` is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming sync message here.\nend)\n```\nReason: `net.Receive` registers a callback for the named incoming net message, so this handler runs whenever `MyAddon.Sync` is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":58146,"startedAt":"2026-07-11T07:37:00.967Z","completedAt":"2026-07-11T07:37:59.284Z","answerBytes":442,"answerChars":442,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":2903,"totalTokens":17804,"reasoningTokens":2770,"cachedTokens":14336},"finalResponse":"```lua\nlocal scratchAng = Angle()\n\n-- Slow in a hot path:\n-- local ang = Angle()\n\n-- Fast when the value is scratch-only for immediate use:\nlocal function getZeroAngle()\n    scratchAng.p = 0\n    scratchAng.y = 0\n    scratchAng.r = 0\n    return scratchAng\nend\n```\nReason: Reusing one scratch `Angle` and zeroing it in place avoids per-call allocation and garbage collection overhead; only use it when callers do not retain the returned object.","model_patch":"```lua\nlocal scratchAng = Angle()\n\n-- Slow in a hot path:\n-- local ang = Angle()\n\n-- Fast when the value is scratch-only for immediate use:\nlocal function getZeroAngle()\n    scratchAng.p = 0\n    scratchAng.y = 0\n    scratchAng.r = 0\n    return scratchAng\nend\n```\nReason: Reusing one scratch `Angle` and zeroing it in place avoids per-call allocation and garbage collection overhead; only use it when callers do not retain the returned object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10461,"startedAt":"2026-07-11T07:37:01.310Z","completedAt":"2026-07-11T07:37:11.810Z","answerBytes":271,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":343,"totalTokens":15247,"reasoningTokens":259,"cachedTokens":14336},"finalResponse":"```lua\nlocal MYADDON_COLOR = Color(255, 0, 0)\n\nlocal color = MYADDON_COLOR\n```\nReason: A local variable is fastest for hot reads because Lua resolves locals directly, while `myaddon.config.color` does multiple table lookups and globals also require an environment lookup.","model_patch":"```lua\nlocal MYADDON_COLOR = Color(255, 0, 0)\n\nlocal color = MYADDON_COLOR\n```\nReason: A local variable is fastest for hot reads because Lua resolves locals directly, while `myaddon.config.color` does multiple table lookups and globals also require an environment lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15152,"startedAt":"2026-07-11T07:37:01.326Z","completedAt":"2026-07-11T07:37:16.820Z","answerBytes":314,"answerChars":314,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":630,"totalTokens":15528,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\n-- Preferred in DarkRP\nlocal jobName = ply:getDarkRPVar(\"job\") or \"\"\n\n-- Avoid for DarkRP job data\nlocal oldJobName = ply:GetNWString(\"job\")\n```\nReason: `job` is a DarkRPVar, so `ply:getDarkRPVar(\"job\")` is the framework API DarkRP maintains and syncs correctly; `GetNWString(\"job\")` bypasses that contract.","model_patch":"```lua\n-- Preferred in DarkRP\nlocal jobName = ply:getDarkRPVar(\"job\") or \"\"\n\n-- Avoid for DarkRP job data\nlocal oldJobName = ply:GetNWString(\"job\")\n```\nReason: `job` is a DarkRPVar, so `ply:getDarkRPVar(\"job\")` is the framework API DarkRP maintains and syncs correctly; `GetNWString(\"job\")` bypasses that contract."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8187,"startedAt":"2026-07-11T07:37:01.346Z","completedAt":"2026-07-11T07:37:09.939Z","answerBytes":257,"answerChars":257,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":241,"totalTokens":15140,"reasoningTokens":150,"cachedTokens":14336},"finalResponse":"```lua\nlocal maxDist = 256\n\nif pos1:DistToSqr(pos2) <= maxDist * maxDist then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root in `Distance`, so it is the preferred faster check when you only need to compare against a threshold.","model_patch":"```lua\nlocal maxDist = 256\n\nif pos1:DistToSqr(pos2) <= maxDist * maxDist then\n    -- within range\nend\n```\nReason: `Vector:DistToSqr` avoids the square root in `Distance`, so it is the preferred faster check when you only need to compare against a threshold."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":14546,"startedAt":"2026-07-11T07:37:02.111Z","completedAt":"2026-07-11T07:37:16.659Z","answerBytes":346,"answerChars":346,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14895,"completionTokens":619,"totalTokens":15514,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- Work with ent here\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- Work with ent here\n    end\nend\n```\nReason: `ents.Iterator()` avoids building a full entity table and is the efficient wiki-recommended choice when you only need to visit every entity.","model_patch":"```lua\nif ents.Iterator then\n    for _, ent in ents.Iterator() do\n        -- Work with ent here\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- Work with ent here\n    end\nend\n```\nReason: `ents.Iterator()` avoids building a full entity table and is the efficient wiki-recommended choice when you only need to visit every entity."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15151,"startedAt":"2026-07-11T07:37:02.678Z","completedAt":"2026-07-11T07:37:18.031Z","answerBytes":455,"answerChars":451,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14918,"completionTokens":614,"totalTokens":15532,"reasoningTokens":477,"cachedTokens":14336},"finalResponse":"```lua\nlocal center = ply:GetPos()\nlocal radius = 512\nlocal nearby = ents.FindInSphere(center, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- cheap nearby-entity work here\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in spatial query for “near player” checks, usually benchmarking well among general-purpose `FindIn*` options without depending on PVS visibility state.","model_patch":"```lua\nlocal center = ply:GetPos()\nlocal radius = 512\nlocal nearby = ents.FindInSphere(center, radius)\n\nfor i = 1, #nearby do\n    local ent = nearby[i]\n    if ent ~= ply and IsValid(ent) then\n        -- cheap nearby-entity work here\n    end\nend\n```\nReason: `ents.FindInSphere` is a common fast built-in spatial query for “near player” checks, usually benchmarking well among general-purpose `FindIn*` options without depending on PVS visibility state."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":42672,"startedAt":"2026-07-11T07:37:02.723Z","completedAt":"2026-07-11T07:37:45.563Z","answerBytes":650,"answerChars":650,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":2136,"totalTokens":17044,"reasoningTokens":1940,"cachedTokens":0},"finalResponse":"```lua\nlocal player_GetAll = player.GetAll\nlocal table_Empty = table.Empty\n\nlocal function FindPlayersNear(pos, radius, out)\n    out = out or {}\n    table_Empty(out)\n\n    local players = player_GetAll()\n    local radiusSqr = radius * radius\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            n = n + 1\n            out[n] = ply\n        end\n    end\n\n    return out\nend\n```\nReason: It scans only the player list instead of all entities in the sphere, uses squared distance to avoid extra math, and can reuse the output table to reduce allocations on hot paths.","model_patch":"```lua\nlocal player_GetAll = player.GetAll\nlocal table_Empty = table.Empty\n\nlocal function FindPlayersNear(pos, radius, out)\n    out = out or {}\n    table_Empty(out)\n\n    local players = player_GetAll()\n    local radiusSqr = radius * radius\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            n = n + 1\n            out[n] = ply\n        end\n    end\n\n    return out\nend\n```\nReason: It scans only the player list instead of all entities in the sphere, uses squared distance to avoid extra math, and can reuse the output table to reduce allocations on hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11118,"startedAt":"2026-07-11T07:37:03.174Z","completedAt":"2026-07-11T07:37:14.372Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":426,"totalTokens":15327,"reasoningTokens":348,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n    -- body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the runtime handles the loop counter and bounds more efficiently than a manual `while` loop.","model_patch":"```lua\nfor i = 1, n do\n    -- body\nend\n```\nReason: Numeric `for` is generally faster for tight 1..n counting in Garry's Mod Lua because the runtime handles the loop counter and bounds more efficiently than a manual `while` loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":18335,"startedAt":"2026-07-11T07:37:03.627Z","completedAt":"2026-07-11T07:37:22.077Z","answerBytes":790,"answerChars":790,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14911,"completionTokens":745,"totalTokens":15656,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\n-- Faster: dispatch one hook per tick and pass the player list once.\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyPlayersTick\", players)\nend)\n\n-- Example consumer for the fast pattern.\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom logic for ply\n    end\nend)\n\n-- Slower: dispatch one hook per player per tick.\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        hook.Run(\"MyPlayerTick\", players[i])\n    end\nend)\n``` \nReason: Calling `hook.Run` once avoids repeated hook dispatch, argument setup, and lookup overhead every tick, so it scales better as player count rises.","model_patch":"```lua\n-- Faster: dispatch one hook per tick and pass the player list once.\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyPlayersTick\", players)\nend)\n\n-- Example consumer for the fast pattern.\nhook.Add(\"MyPlayersTick\", \"CustomLogic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        -- custom logic for ply\n    end\nend)\n\n-- Slower: dispatch one hook per player per tick.\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        hook.Run(\"MyPlayerTick\", players[i])\n    end\nend)\n``` \nReason: Calling `hook.Run` once avoids repeated hook dispatch, argument setup, and lookup overhead every tick, so it scales better as player count rises."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18677,"startedAt":"2026-07-11T07:37:03.998Z","completedAt":"2026-07-11T07:37:22.754Z","answerBytes":587,"answerChars":587,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":719,"totalTokens":15627,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n    local healthText = tostring(health)\n\n    draw.SimpleText(healthText, \"Trebuchet24\", 32, 32, color_white)\n    draw.RoundedBox(4, 32, 64, math.Clamp(health, 0, 100) * 2, 20, Color(220, 60, 60))\n    draw.SimpleText(healthText, \"Trebuchet18\", 240, 66, color_white)\nend)\n```\nReason: It reads `LocalPlayer():Health()` once per frame and reuses the cached value, avoiding repeated Lua-to-engine calls and extra string conversion work.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n    local healthText = tostring(health)\n\n    draw.SimpleText(healthText, \"Trebuchet24\", 32, 32, color_white)\n    draw.RoundedBox(4, 32, 64, math.Clamp(health, 0, 100) * 2, 20, Color(220, 60, 60))\n    draw.SimpleText(healthText, \"Trebuchet18\", 240, 66, color_white)\nend)\n```\nReason: It reads `LocalPlayer():Health()` once per frame and reuses the cached value, avoiding repeated Lua-to-engine calls and extra string conversion work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17606,"startedAt":"2026-07-11T07:37:04.360Z","completedAt":"2026-07-11T07:37:21.997Z","answerBytes":377,"answerChars":377,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":645,"totalTokens":15543,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal WHITE = color_white -- reuse; do not mutate\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 100 do\n        surface.DrawRect(0, (i - 1) * 4, w, 2)\n    end\nend\n```\nReason: This avoids constructing a new `Color` every iteration and, when the color stays constant, also avoids repeating the same `surface.SetDrawColor` call inside the loop.","model_patch":"```lua\nlocal WHITE = color_white -- reuse; do not mutate\n\nfunction PANEL:Paint(w, h)\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, 100 do\n        surface.DrawRect(0, (i - 1) * 4, w, 2)\n    end\nend\n```\nReason: This avoids constructing a new `Color` every iteration and, when the color stays constant, also avoids repeating the same `surface.SetDrawColor` call inside the loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6888,"startedAt":"2026-07-11T07:37:04.380Z","completedAt":"2026-07-11T07:37:11.637Z","answerBytes":163,"answerChars":163,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14896,"completionTokens":182,"totalTokens":15078,"reasoningTokens":112,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    out[i] = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookup in the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    out[i] = sin(i)\nend\n```\nReason: Caching `math.sin` in a local avoids repeated table/global lookup in the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25657,"startedAt":"2026-07-11T07:37:05.585Z","completedAt":"2026-07-11T07:37:31.277Z","answerBytes":740,"answerChars":740,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":1254,"totalTokens":16153,"reasoningTokens":1034,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedLocalPlayer\nlocal LocalPlayer = LocalPlayer\nlocal IsValid = IsValid\n\nlocal function LP()\n    local ply = cachedLocalPlayer\n    if IsValid(ply) then\n        return ply\n    end\n\n    ply = LocalPlayer()\n    if IsValid(ply) then\n        cachedLocalPlayer = ply\n    end\n\n    return ply\nend\n\nhook.Add(\"Think\", \"FastLocalPlayerUse\", function()\n    local ply = LP()\n    if not IsValid(ply) then return end\n\n    local pos = ply:GetPos()\n    local vel = ply:GetVelocity()\n    local alive = ply:Alive()\n\n    -- use ply for the rest of the hot path\nend)\n```\nReason: this caches the local player entity in a Lua upvalue and only refreshes it when invalid, so hot code avoids repeated global lookups and repeated `LocalPlayer()` calls.","model_patch":"```lua\nlocal cachedLocalPlayer\nlocal LocalPlayer = LocalPlayer\nlocal IsValid = IsValid\n\nlocal function LP()\n    local ply = cachedLocalPlayer\n    if IsValid(ply) then\n        return ply\n    end\n\n    ply = LocalPlayer()\n    if IsValid(ply) then\n        cachedLocalPlayer = ply\n    end\n\n    return ply\nend\n\nhook.Add(\"Think\", \"FastLocalPlayerUse\", function()\n    local ply = LP()\n    if not IsValid(ply) then return end\n\n    local pos = ply:GetPos()\n    local vel = ply:GetVelocity()\n    local alive = ply:Alive()\n\n    -- use ply for the rest of the hot path\nend)\n```\nReason: this caches the local player entity in a Lua upvalue and only refreshes it when invalid, so hot code avoids repeated global lookups and repeated `LocalPlayer()` calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":54967,"startedAt":"2026-07-11T07:37:05.795Z","completedAt":"2026-07-11T07:38:00.771Z","answerBytes":454,"answerChars":454,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14915,"completionTokens":2736,"totalTokens":17651,"reasoningTokens":2588,"cachedTokens":14336},"finalResponse":"```lua\nlocal OPPOSITE_DOT = -0.8 -- closer to -1 means stricter\n\nlocal function ArePlayersRoughlyFacingEachOther(ply1, ply2)\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n    return aim1:Dot(aim2) <= OPPOSITE_DOT\nend\n```\nReason: `GetAimVector()` returns normalized vectors, so one dot product tells you how opposite the two aim directions are; thresholding that value is much cheaper than computing an angle with `math.acos`. ","model_patch":"```lua\nlocal OPPOSITE_DOT = -0.8 -- closer to -1 means stricter\n\nlocal function ArePlayersRoughlyFacingEachOther(ply1, ply2)\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n    return aim1:Dot(aim2) <= OPPOSITE_DOT\nend\n```\nReason: `GetAimVector()` returns normalized vectors, so one dot product tells you how opposite the two aim directions are; thresholding that value is much cheaper than computing an angle with `math.acos`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13876,"startedAt":"2026-07-11T07:37:05.967Z","completedAt":"2026-07-11T07:37:19.854Z","answerBytes":302,"answerChars":302,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14905,"completionTokens":474,"totalTokens":15379,"reasoningTokens":385,"cachedTokens":14336},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally a bit faster for a helper you control because a direct call, especially to a local function, avoids the method lookup that `ply:SomeHelper()` usually implies; the difference is small, so prefer `:` only when it is truly a player method.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is generally a bit faster for a helper you control because a direct call, especially to a local function, avoids the method lookup that `ply:SomeHelper()` usually implies; the difference is small, so prefer `:` only when it is truly a player method."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19331,"startedAt":"2026-07-11T07:37:06.326Z","completedAt":"2026-07-11T07:37:25.741Z","answerBytes":209,"answerChars":209,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":411,"totalTokens":15309,"reasoningTokens":339,"cachedTokens":14336},"finalResponse":"```lua\nMsgN(\"[debug] hot path hit\")\n```\nReason: `MsgN` is generally faster than `print` in Garry's Mod because it writes to the console more directly with less formatting overhead, which matters in a hot path.","model_patch":"```lua\nMsgN(\"[debug] hot path hit\")\n```\nReason: `MsgN` is generally faster than `print` in Garry's Mod because it writes to the console more directly with less formatting overhead, which matters in a hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11296,"startedAt":"2026-07-11T07:37:06.909Z","completedAt":"2026-07-11T07:37:18.207Z","answerBytes":261,"answerChars":261,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":439,"totalTokens":15345,"reasoningTokens":345,"cachedTokens":14336},"finalResponse":"```lua\nlocal sum = 0\nlocal t = numbers\nlocal n = #t\n\nfor i = 1, n do\n    sum = sum + t[i]\nend\n```\nReason: `numeric for` is typically fastest for a large dense array because it does direct indexed access and avoids the iterator overhead of `pairs` and `ipairs`. ","model_patch":"```lua\nlocal sum = 0\nlocal t = numbers\nlocal n = #t\n\nfor i = 1, n do\n    sum = sum + t[i]\nend\n```\nReason: `numeric for` is typically fastest for a large dense array because it does direct indexed access and avoids the iterator overhead of `pairs` and `ipairs`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":40204,"startedAt":"2026-07-11T07:37:07.199Z","completedAt":"2026-07-11T07:37:47.548Z","answerBytes":571,"answerChars":571,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14918,"completionTokens":2047,"totalTokens":16965,"reasoningTokens":1870,"cachedTokens":14336},"finalResponse":"```lua\n-- Instead of chaining fn.Filter(...) then fn.Map(...), fuse the pipeline.\nlocal IsValid = IsValid\nlocal players = player.GetAll()\n\nlocal copNames = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local p = players[i]\n    if IsValid(p) and p:Alive() and p:isCP() then\n        n = n + 1\n        copNames[n] = p:Nick()\n    end\nend\n\n-- copNames now contains the mapped result for the filtered players.\n```\nReason: A single numeric `for` loop does the filter and map in one pass, which avoids fn combinator call overhead, extra closures, and intermediate table allocations.","model_patch":"```lua\n-- Instead of chaining fn.Filter(...) then fn.Map(...), fuse the pipeline.\nlocal IsValid = IsValid\nlocal players = player.GetAll()\n\nlocal copNames = {}\nlocal n = 0\n\nfor i = 1, #players do\n    local p = players[i]\n    if IsValid(p) and p:Alive() and p:isCP() then\n        n = n + 1\n        copNames[n] = p:Nick()\n    end\nend\n\n-- copNames now contains the mapped result for the filtered players.\n```\nReason: A single numeric `for` loop does the filter and map in one pass, which avoids fn combinator call overhead, extra closures, and intermediate table allocations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":44323,"startedAt":"2026-07-11T07:37:07.521Z","completedAt":"2026-07-11T07:37:52.344Z","answerBytes":1132,"answerChars":1132,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14917,"completionTokens":2288,"totalTokens":17205,"reasoningTokens":1948,"cachedTokens":14336},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nfor i, ply in ipairs(player.GetAll()) do\n    cachedPlayers[i] = ply\n    playerIndex[ply] = i\nend\n\nlocal function addPlayer(ply)\n    if playerIndex[ply] then return end\n\n    local i = #cachedPlayers + 1\n    cachedPlayers[i] = ply\n    playerIndex[ply] = i\nend\n\nlocal function removePlayer(ply)\n    local i = playerIndex[ply]\n    if not i then return end\n\n    local last = #cachedPlayers\n    local lastPly = cachedPlayers[last]\n\n    cachedPlayers[i] = lastPly\n    cachedPlayers[last] = nil\n    playerIndex[ply] = nil\n\n    if lastPly ~= ply then\n        playerIndex[lastPly] = i\n    end\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCacheAdd\", addPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCacheRemove\", removePlayer)\n\nhook.Add(\"Tick\", \"FastPerPlayerTick\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- per-player tick work here\n    end\nend)\n```\nReason: This removes the per-tick `player.GetAll()` call and keeps the hot path to a plain cached-array loop, while join/leave hooks pay the small update cost only when membership changes.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nfor i, ply in ipairs(player.GetAll()) do\n    cachedPlayers[i] = ply\n    playerIndex[ply] = i\nend\n\nlocal function addPlayer(ply)\n    if playerIndex[ply] then return end\n\n    local i = #cachedPlayers + 1\n    cachedPlayers[i] = ply\n    playerIndex[ply] = i\nend\n\nlocal function removePlayer(ply)\n    local i = playerIndex[ply]\n    if not i then return end\n\n    local last = #cachedPlayers\n    local lastPly = cachedPlayers[last]\n\n    cachedPlayers[i] = lastPly\n    cachedPlayers[last] = nil\n    playerIndex[ply] = nil\n\n    if lastPly ~= ply then\n        playerIndex[lastPly] = i\n    end\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCacheAdd\", addPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCacheRemove\", removePlayer)\n\nhook.Add(\"Tick\", \"FastPerPlayerTick\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- per-player tick work here\n    end\nend)\n```\nReason: This removes the per-tick `player.GetAll()` call and keeps the hot path to a plain cached-array loop, while join/leave hooks pay the small update cost only when membership changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":40159,"startedAt":"2026-07-11T07:37:07.640Z","completedAt":"2026-07-11T07:37:48.187Z","answerBytes":561,"answerChars":561,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":1934,"totalTokens":16834,"reasoningTokens":1756,"cachedTokens":14336},"finalResponse":"```lua\nlocal tempByEntIndex = {}\n\nlocal function SetTempValue(ply, value)\n    tempByEntIndex[ply:EntIndex()] = value\nend\n\nlocal function GetTempValue(ply)\n    return tempByEntIndex[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempValue\", function(ply)\n    tempByEntIndex[ply:EntIndex()] = nil\nend)\n\n-- usage\nSetTempValue(ply, value)\nlocal value = GetTempValue(ply)\n```\nReason: A plain Lua table keyed by `EntIndex()` avoids repeated userdata field lookup on `ply.someField`, so hot reads are cheaper; clearing on disconnect avoids index reuse bugs.","model_patch":"```lua\nlocal tempByEntIndex = {}\n\nlocal function SetTempValue(ply, value)\n    tempByEntIndex[ply:EntIndex()] = value\nend\n\nlocal function GetTempValue(ply)\n    return tempByEntIndex[ply:EntIndex()]\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearTempValue\", function(ply)\n    tempByEntIndex[ply:EntIndex()] = nil\nend)\n\n-- usage\nSetTempValue(ply, value)\nlocal value = GetTempValue(ply)\n```\nReason: A plain Lua table keyed by `EntIndex()` avoids repeated userdata field lookup on `ply.someField`, so hot reads are cheaper; clearing on disconnect avoids index reuse bugs."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11927,"startedAt":"2026-07-11T07:37:07.716Z","completedAt":"2026-07-11T07:37:20.074Z","answerBytes":345,"answerChars":345,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14905,"completionTokens":486,"totalTokens":15391,"reasoningTokens":368,"cachedTokens":14336},"finalResponse":"```lua\nlocal values = {\n    \"weapon_pistol\",\n    \"weapon_smg1\",\n    \"weapon_shotgun\",\n    \"weapon_crowbar\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use the table's array part and avoid hash lookup overhead, so they iterate faster than string-keyed maps in hot loops.","model_patch":"```lua\nlocal values = {\n    \"weapon_pistol\",\n    \"weapon_smg1\",\n    \"weapon_shotgun\",\n    \"weapon_crowbar\",\n}\n\nfor i = 1, #values do\n    local value = values[i]\n    -- use value\nend\n```\nReason: Sequential number-indexed arrays use the table's array part and avoid hash lookup overhead, so they iterate faster than string-keyed maps in hot loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13152,"startedAt":"2026-07-11T07:37:07.734Z","completedAt":"2026-07-11T07:37:21.304Z","answerBytes":316,"answerChars":316,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14908,"completionTokens":553,"totalTokens":15461,"reasoningTokens":434,"cachedTokens":14336},"finalResponse":"```lua\nlocal R, G, B, A = 255, 128, 64, 255\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    surface.SetDrawColor(R, G, B, A)\n    surface.DrawRect(100, 100, 200, 40)\nend)\n```\nReason: Passing raw numeric channels avoids the extra Color/table path and per-call component extraction, so it is faster in a hot draw loop.","model_patch":"```lua\nlocal R, G, B, A = 255, 128, 64, 255\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    surface.SetDrawColor(R, G, B, A)\n    surface.DrawRect(100, 100, 200, 40)\nend)\n```\nReason: Passing raw numeric channels avoids the extra Color/table path and per-call component extraction, so it is faster in a hot draw loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12992,"startedAt":"2026-07-11T07:37:07.995Z","completedAt":"2026-07-11T07:37:21.304Z","answerBytes":338,"answerChars":338,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14924,"completionTokens":499,"totalTokens":15423,"reasoningTokens":397,"cachedTokens":14336},"finalResponse":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal coins = tonumber(sql.QueryValue(\"SELECT coins FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64)) or 0)\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round-trips and remote MySQL connection overhead.","model_patch":"```lua\nlocal steamID64 = ply:SteamID64()\nlocal coins = tonumber(sql.QueryValue(\"SELECT coins FROM player_data WHERE steamid64 = \" .. sql.SQLStr(steamID64)) or 0)\n```\nReason: Local SQLite via Garry's Mod `sql` library is typically lower latency on a single server because it avoids network round-trips and remote MySQL connection overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15980,"startedAt":"2026-07-11T07:37:08.011Z","completedAt":"2026-07-11T07:37:24.343Z","answerBytes":565,"answerChars":565,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":701,"totalTokens":15602,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local sid = steamIdCache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamIdCache[ply] = sid\n    return sid\nend\n\n-- Hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetSteamIDCached(ply)\n\n    -- use sid as many times as needed here\nend\n```\nReason: It replaces repeated `ply:SteamID()` engine calls with one lookup per player, and the weak-key cache cleans itself up when player objects go away.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local sid = steamIdCache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamIdCache[ply] = sid\n    return sid\nend\n\n-- Hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetSteamIDCached(ply)\n\n    -- use sid as many times as needed here\nend\n```\nReason: It replaces repeated `ply:SteamID()` engine calls with one lookup per player, and the weak-key cache cleans itself up when player objects go away."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12100,"startedAt":"2026-07-11T07:37:08.311Z","completedAt":"2026-07-11T07:37:20.470Z","answerBytes":389,"answerChars":389,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14900,"completionTokens":515,"totalTokens":15415,"reasoningTokens":380,"cachedTokens":14336},"finalResponse":"```lua\n-- Slow: repeated concatenation\nlocal s = \"\"\nfor i = 1, #pieces do\n    s = s .. pieces[i]\nend\n\n-- Fast: collect pieces, join once\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\n\nlocal s_fast = table.concat(parts)\n```\nReason: `table.concat` does one final join, avoiding the repeated reallocations and full-string copies caused by `s = s .. piece` inside a loop.","model_patch":"```lua\n-- Slow: repeated concatenation\nlocal s = \"\"\nfor i = 1, #pieces do\n    s = s .. pieces[i]\nend\n\n-- Fast: collect pieces, join once\nlocal parts = {}\nfor i = 1, #pieces do\n    parts[i] = pieces[i]\nend\n\nlocal s_fast = table.concat(parts)\n```\nReason: `table.concat` does one final join, avoiding the repeated reallocations and full-string copies caused by `s = s .. piece` inside a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8990,"startedAt":"2026-07-11T07:37:09.745Z","completedAt":"2026-07-11T07:37:18.755Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14904,"completionTokens":300,"totalTokens":15204,"reasoningTokens":207,"cachedTokens":14336},"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` is the direct plain-rectangle path, while `draw.RoundedBox(0, ...)` still pays extra Lua helper overhead for a rounded-box API you are not using.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` is the direct plain-rectangle path, while `draw.RoundedBox(0, ...)` still pays extra Lua helper overhead for a rounded-box API you are not using."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":43068,"startedAt":"2026-07-11T07:37:10.023Z","completedAt":"2026-07-11T07:37:53.179Z","answerBytes":582,"answerChars":582,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14899,"completionTokens":1749,"totalTokens":16648,"reasoningTokens":1552,"cachedTokens":14336},"finalResponse":"```lua\nsurface.CreateFont(\"PerfHUDText\", {\n    font = \"Tahoma\",\n    size = 24,\n    weight = 500,\n    antialias = true,\n})\n\nlocal FONT = \"PerfHUDText\"\nlocal X, Y = 32, 32\nlocal TEXT = \"Single-line HUD text\"\n\nhook.Add(\"HUDPaint\", \"PerfSurfaceText\", function()\n    surface.SetFont(FONT)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(X, Y)\n    surface.DrawText(TEXT)\nend)\n```\nReason: Direct `surface` text calls avoid the extra wrapper work in `draw.DrawText` and the multi-pass outline draws in `draw.SimpleTextOutlined`, so single-line text is cheaper per frame.","model_patch":"```lua\nsurface.CreateFont(\"PerfHUDText\", {\n    font = \"Tahoma\",\n    size = 24,\n    weight = 500,\n    antialias = true,\n})\n\nlocal FONT = \"PerfHUDText\"\nlocal X, Y = 32, 32\nlocal TEXT = \"Single-line HUD text\"\n\nhook.Add(\"HUDPaint\", \"PerfSurfaceText\", function()\n    surface.SetFont(FONT)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(X, Y)\n    surface.DrawText(TEXT)\nend)\n```\nReason: Direct `surface` text calls avoid the extra wrapper work in `draw.DrawText` and the multi-pass outline draws in `draw.SimpleTextOutlined`, so single-line text is cheaper per frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14605,"startedAt":"2026-07-11T07:37:10.290Z","completedAt":"2026-07-11T07:37:24.898Z","answerBytes":235,"answerChars":235,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":189,"totalTokens":15086,"reasoningTokens":119,"cachedTokens":14336},"finalResponse":"```lua\nlocal len = #myTable\n```\nReason: `#` is the preferred way to get the length of a sequential array-like table; it is the native Lua length operator and avoids the overhead and different semantics of functions like `table.Count`. ","model_patch":"```lua\nlocal len = #myTable\n```\nReason: `#` is the preferred way to get the length of a sequential array-like table; it is the native Lua length operator and avoids the overhead and different semantics of functions like `table.Count`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11273,"startedAt":"2026-07-11T07:37:10.556Z","completedAt":"2026-07-11T07:37:21.908Z","answerBytes":327,"answerChars":327,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14902,"completionTokens":458,"totalTokens":15360,"reasoningTokens":360,"cachedTokens":14336},"finalResponse":"```lua\nlocal t = bigSequentialTable\n\n-- Faster when you do not need to preserve existing references to the same table.\nt = {}\n```\nReason: `t = {}` is generally faster because rebinding is O(1), while `table.Empty(t)` iterates and clears every entry; use `table.Empty(t)` only when other code must keep the same table reference.","model_patch":"```lua\nlocal t = bigSequentialTable\n\n-- Faster when you do not need to preserve existing references to the same table.\nt = {}\n```\nReason: `t = {}` is generally faster because rebinding is O(1), while `table.Empty(t)` iterates and clears every entry; use `table.Empty(t)` only when other code must keep the same table reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21312,"startedAt":"2026-07-11T07:37:10.767Z","completedAt":"2026-07-11T07:37:32.134Z","answerBytes":325,"answerChars":325,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14898,"completionTokens":576,"totalTokens":15474,"reasoningTokens":455,"cachedTokens":14336},"finalResponse":"```lua\nlocal allowed = {\n    [\"weapon_crowbar\"] = true,\n    [\"weapon_pistol\"] = true,\n    [\"weapon_shotgun\"] = true,\n}\n\nif allowed[wepClass] then\n    -- value exists\nend\n```\nReason: A set-style table uses a direct hash lookup, so the check is typically O(1) instead of the O(n) linear scan done by `table.HasValue` on a list.","model_patch":"```lua\nlocal allowed = {\n    [\"weapon_crowbar\"] = true,\n    [\"weapon_pistol\"] = true,\n    [\"weapon_shotgun\"] = true,\n}\n\nif allowed[wepClass] then\n    -- value exists\nend\n```\nReason: A set-style table uses a direct hash lookup, so the check is typically O(1) instead of the O(n) linear scan done by `table.HasValue` on a list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":21292,"startedAt":"2026-07-11T07:37:10.944Z","completedAt":"2026-07-11T07:37:32.278Z","answerBytes":238,"answerChars":238,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14901,"completionTokens":752,"totalTokens":15653,"reasoningTokens":669,"cachedTokens":14336},"finalResponse":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: Putting known fields in the table constructor is faster because the table is created and populated in one step, with fewer separate field writes and better sizing up front.","model_patch":"```lua\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n```\nReason: Putting known fields in the table constructor is faster because the table is created and populated in one step, with fewer separate field writes and better sizing up front."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15632,"startedAt":"2026-07-11T07:37:11.638Z","completedAt":"2026-07-11T07:37:27.271Z","answerBytes":229,"answerChars":229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14897,"completionTokens":245,"totalTokens":15142,"reasoningTokens":163,"cachedTokens":14336},"finalResponse":"```lua\nlocal values = { \"a\", \"b\", \"c\", \"d\" }\nlocal randomValue = values[math.random(#values)]\n```\nReason: For sequential tables, direct index selection with `math.random(#values)` avoids `table.Random`'s extra work and is faster.","model_patch":"```lua\nlocal values = { \"a\", \"b\", \"c\", \"d\" }\nlocal randomValue = values[math.random(#values)]\n```\nReason: For sequential tables, direct index selection with `math.random(#values)` avoids `table.Random`'s extra work and is faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16365,"startedAt":"2026-07-11T07:37:11.812Z","completedAt":"2026-07-11T07:37:28.178Z","answerBytes":160,"answerChars":160,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14892,"completionTokens":332,"totalTokens":15224,"reasoningTokens":270,"cachedTokens":14336},"finalResponse":"```lua\nlocal x2 = x * x\n```\nReason: `x * x` is the preferred fast form in tight loops because it avoids the slower generic exponentiation path used by `x ^ 2`. ","model_patch":"```lua\nlocal x2 = x * x\n```\nReason: `x * x` is the preferred fast form in tight loops because it avoids the slower generic exponentiation path used by `x ^ 2`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4@xhigh","model_name_or_path":"gpt-5.4@xhigh","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":21931,"startedAt":"2026-07-11T07:37:14.414Z","completedAt":"2026-07-11T07:37:36.358Z","answerBytes":202,"answerChars":202,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14906,"completionTokens":579,"totalTokens":15485,"reasoningTokens":516,"cachedTokens":14336},"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply here\nend\n```\nReason: `player.Iterator()` iterates connected players directly without building the temporary table that `player.GetAll()` returns.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- use ply here\nend\n```\nReason: `player.Iterator()` iterates connected players directly without building the temporary table that `player.GetAll()` returns."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11466,"startedAt":"2026-07-11T07:37:16.167Z","completedAt":"2026-07-11T07:37:27.727Z","answerBytes":254,"answerChars":254,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":90,"totalTokens":14639,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- visit each prop_physics entity here\nend\n```\nReason: `ents.FindByClass` returns only entities of the requested class, so this avoids building a table of every entity in the map first.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- visit each prop_physics entity here\nend\n```\nReason: `ents.FindByClass` returns only entities of the requested class, so this avoids building a table of every entity in the map first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":12132,"startedAt":"2026-07-11T07:37:16.664Z","completedAt":"2026-07-11T07:37:28.801Z","answerBytes":171,"answerChars":171,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":75,"totalTokens":14628,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function for the `Think` hook, and `MyAddon.Think` is the callback identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a function for the `Think` hook, and `MyAddon.Think` is the callback identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":11463,"startedAt":"2026-07-11T07:37:16.871Z","completedAt":"2026-07-11T07:37:28.397Z","answerBytes":168,"answerChars":168,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":67,"totalTokens":14615,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n```\nReason: `IsValid` is the standard Garry's Mod check for an entity reference that is still alive and usable before calling methods on it.","model_patch":"```lua\nif IsValid(ent) then\n```\nReason: `IsValid` is the standard Garry's Mod check for an entity reference that is still alive and usable before calling methods on it."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12645,"startedAt":"2026-07-11T07:37:18.033Z","completedAt":"2026-07-11T07:37:30.683Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14539,"completionTokens":86,"totalTokens":14625,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle incoming message here\nend)\n```\nReason: `net.Receive` registers the client or server callback for the named Garry's Mod net message, and `MyAddon.Sync` is the message identifier.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle incoming message here\nend)\n```\nReason: `net.Receive` registers the client or server callback for the named Garry's Mod net message, and `MyAddon.Sync` is the message identifier."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":4932,"startedAt":"2026-07-11T07:37:18.208Z","completedAt":"2026-07-11T07:37:23.226Z","answerBytes":255,"answerChars":255,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":100,"totalTokens":14647,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- reuse it instead of calling Angle() every time in a hot path\nreturn ZERO_ANGLE\n```\nReason: `Angle(0, 0, 0)` allocates a new Angle object; reusing one shared zero angle avoids repeated construction in hot paths.","model_patch":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- reuse it instead of calling Angle() every time in a hot path\nreturn ZERO_ANGLE\n```\nReason: `Angle(0, 0, 0)` allocates a new Angle object; reusing one shared zero angle avoids repeated construction in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13366,"startedAt":"2026-07-11T07:37:18.840Z","completedAt":"2026-07-11T07:37:32.485Z","answerBytes":237,"answerChars":237,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14554,"completionTokens":96,"totalTokens":14650,"reasoningTokens":20,"cachedTokens":0},"finalResponse":"```lua\nlocal addon_color = Color(255, 255, 255)\n\nlocal c = addon_color\n```\nReason: A flat local avoids repeated table lookups and is the fastest frequent-read option; nested tables are better for organization, but not for hot-path reads.","model_patch":"```lua\nlocal addon_color = Color(255, 255, 255)\n\nlocal c = addon_color\n```\nReason: A flat local avoids repeated table lookups and is the fastest frequent-read option; nested tables are better for organization, but not for hot-path reads."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14805,"startedAt":"2026-07-11T07:37:20.004Z","completedAt":"2026-07-11T07:37:34.955Z","answerBytes":233,"answerChars":233,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":106,"totalTokens":14652,"reasoningTokens":20,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the live job name in its own networked variable API, so `getDarkRPVar(\"job\")` is the preferred, DarkRP-aware way to read it instead of raw `GetNWString(\"job\")`.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the live job name in its own networked variable API, so `getDarkRPVar(\"job\")` is the preferred, DarkRP-aware way to read it instead of raw `GetNWString(\"job\")`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12978,"startedAt":"2026-07-11T07:37:20.191Z","completedAt":"2026-07-11T07:37:33.220Z","answerBytes":190,"answerChars":190,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":83,"totalTokens":14630,"reasoningTokens":11,"cachedTokens":0},"finalResponse":"```lua\nif vec1:DistToSqr(vec2) < threshold * threshold then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root, so it is the preferred way to do a vector threshold check.","model_patch":"```lua\nif vec1:DistToSqr(vec2) < threshold * threshold then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root, so it is the preferred way to do a vector threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15759,"startedAt":"2026-07-11T07:37:20.203Z","completedAt":"2026-07-11T07:37:36.005Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14543,"completionTokens":138,"totalTokens":14681,"reasoningTokens":75,"cachedTokens":13824},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- visit every entity here\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to iterate all entities without building a full table first.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- visit every entity here\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient way to iterate all entities without building a full table first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":13641,"startedAt":"2026-07-11T07:37:20.504Z","completedAt":"2026-07-11T07:37:34.299Z","answerBytes":295,"answerChars":291,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14564,"completionTokens":161,"totalTokens":14725,"reasoningTokens":66,"cachedTokens":13824},"finalResponse":"```lua\nlocal pos = ply:GetPos()\nlocal radius = 512\nlocal ents = ents.FindInSphere(pos, radius)\n```\nReason: `ents.FindInSphere` is a fast built-in broad-phase spatial query for “near a player” checks and is the usual cheap pick when you want a radius search without defaulting to `FindInPVS`.","model_patch":"```lua\nlocal pos = ply:GetPos()\nlocal radius = 512\nlocal ents = ents.FindInSphere(pos, radius)\n```\nReason: `ents.FindInSphere` is a fast built-in broad-phase spatial query for “near a player” checks and is the usual cheap pick when you want a radius search without defaulting to `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6849,"startedAt":"2026-07-11T07:37:21.317Z","completedAt":"2026-07-11T07:37:28.238Z","answerBytes":458,"answerChars":458,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":169,"totalTokens":14725,"reasoningTokens":30,"cachedTokens":0},"finalResponse":"```lua\nlocal pos = somePosition\nlocal radius = 512\nlocal radiusSqr = radius * radius\nlocal nearbyPlayers = {}\n\nfor _, ply in ipairs(player.GetAll()) do\n    if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n        nearbyPlayers[#nearbyPlayers + 1] = ply\n    end\nend\n```\nReason: `player.GetAll()` avoids building and scanning non-player entities from `ents.FindInSphere`, and `DistToSqr` skips the expensive square root while still giving the same radius test.","model_patch":"```lua\nlocal pos = somePosition\nlocal radius = 512\nlocal radiusSqr = radius * radius\nlocal nearbyPlayers = {}\n\nfor _, ply in ipairs(player.GetAll()) do\n    if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n        nearbyPlayers[#nearbyPlayers + 1] = ply\n    end\nend\n```\nReason: `player.GetAll()` avoids building and scanning non-player entities from `ents.FindInSphere`, and `DistToSqr` skips the expensive square root while still giving the same radius test."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12164,"startedAt":"2026-07-11T07:37:21.351Z","completedAt":"2026-07-11T07:37:33.531Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":90,"totalTokens":14641,"reasoningTokens":11,"cachedTokens":13824},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: In Garry's Mod Lua, the numeric `for` loop is generally faster than a `while` loop for simple counting because it is a built-in loop form with less per-iteration overhead.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: In Garry's Mod Lua, the numeric `for` loop is generally faster than a `while` loop for simple counting because it is a built-in loop form with less per-iteration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14250,"startedAt":"2026-07-11T07:37:22.001Z","completedAt":"2026-07-11T07:37:36.498Z","answerBytes":351,"answerChars":351,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14559,"completionTokens":180,"totalTokens":14739,"reasoningTokens":66,"cachedTokens":0},"finalResponse":"```lua\n-- Faster: one hook.Run per tick, passing the whole player list once.\nlocal players = player.GetAll()\nhook.Run(\"MyCustomLogic\", players)\n\n-- Slower: hook.Run once per player.\nfor i = 1, #players do\n    hook.Run(\"MyCustomLogic\", players[i])\nend\n``` \nReason: One hook.Run call avoids per-player hook dispatch overhead, so it is cheaper each tick.","model_patch":"```lua\n-- Faster: one hook.Run per tick, passing the whole player list once.\nlocal players = player.GetAll()\nhook.Run(\"MyCustomLogic\", players)\n\n-- Slower: hook.Run once per player.\nfor i = 1, #players do\n    hook.Run(\"MyCustomLogic\", players[i])\nend\n``` \nReason: One hook.Run call avoids per-player hook dispatch overhead, so it is cheaper each tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13070,"startedAt":"2026-07-11T07:37:22.001Z","completedAt":"2026-07-11T07:37:35.398Z","answerBytes":237,"answerChars":237,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14558,"completionTokens":85,"totalTokens":14643,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nlocal lp = LocalPlayer()\nlocal hp = lp:Health()\n\n-- use hp for all three draws in this frame\n```\nReason: cache `LocalPlayer()` and `Health()` once per frame so the hook avoids repeating the same lookup and method call three times.","model_patch":"```lua\nlocal lp = LocalPlayer()\nlocal hp = lp:Health()\n\n-- use hp for all three draws in this frame\n```\nReason: cache `LocalPlayer()` and `Health()` once per frame so the hook avoids repeating the same lookup and method call three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13950,"startedAt":"2026-07-11T07:37:22.233Z","completedAt":"2026-07-11T07:37:36.559Z","answerBytes":323,"answerChars":323,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14542,"completionTokens":126,"totalTokens":14668,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(WHITE)\n    surface.DrawRect(items[i].x, items[i].y, items[i].w, items[i].h)\nend\n```\nReason: `Color(255,255,255)` allocates a new color table every iteration; hoisting one shared white color avoids per-loop allocation and cuts GC work.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(WHITE)\n    surface.DrawRect(items[i].x, items[i].y, items[i].w, items[i].h)\nend\n```\nReason: `Color(255,255,255)` allocates a new color table every iteration; hoisting one shared white color avoids per-loop allocation and cuts GC work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12436,"startedAt":"2026-07-11T07:37:22.755Z","completedAt":"2026-07-11T07:37:35.192Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14544,"completionTokens":86,"totalTokens":14630,"reasoningTokens":8,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local v = sin(i)\n    -- use v\nend\n``` \nReason: Caches `math.sin` in a local upvalue so the hot loop avoids repeated table lookups.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local v = sin(i)\n    -- use v\nend\n``` \nReason: Caches `math.sin` in a local upvalue so the hot loop avoids repeated table lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16271,"startedAt":"2026-07-11T07:37:23.235Z","completedAt":"2026-07-11T07:37:39.547Z","answerBytes":342,"answerChars":342,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14545,"completionTokens":257,"totalTokens":14802,"reasoningTokens":146,"cachedTokens":13824},"finalResponse":"```lua\nlocal lp = nil\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\n-- Use `lp` instead of calling `LocalPlayer()` repeatedly in hot code.\nif IsValid(lp) then\n    print(lp:Nick())\nend\n``` \nReason: Caching the entity in a local avoids repeated global/function lookup and keeps hot paths on a direct local read.","model_patch":"```lua\nlocal lp = nil\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    lp = LocalPlayer()\nend)\n\n-- Use `lp` instead of calling `LocalPlayer()` repeatedly in hot code.\nif IsValid(lp) then\n    print(lp:Nick())\nend\n``` \nReason: Caching the entity in a local avoids repeated global/function lookup and keeps hot paths on a direct local read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14308,"startedAt":"2026-07-11T07:37:24.348Z","completedAt":"2026-07-11T07:37:38.658Z","answerBytes":729,"answerChars":727,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14563,"completionTokens":246,"totalTokens":14809,"reasoningTokens":13,"cachedTokens":13824},"finalResponse":"```lua\n-- Fast mutual look check using dot products (no acos).\n-- Threshold is cosine of the max allowed deviation from directly facing.\n-- Example: 0.75 ~= within about 41.4 degrees of each other.\nlocal function LookingAtEachOther(p1, p2, threshold)\n    threshold = threshold or 0.75\n\n    local e1 = p1:EyeAngles()\n    local e2 = p2:EyeAngles()\n\n    local d1 = e1:Forward()\n    local d2 = e2:Forward()\n\n    local to2 = (p2:EyePos() - p1:EyePos()):GetNormalized()\n    local to1 = -to2\n\n    return d1:Dot(to2) >= threshold and d2:Dot(to1) >= threshold\nend\n``` \nReason: Dot products are cheaper than converting to angles and calling `math.acos`, and they directly test whether each player’s aim direction points toward the other.","model_patch":"```lua\n-- Fast mutual look check using dot products (no acos).\n-- Threshold is cosine of the max allowed deviation from directly facing.\n-- Example: 0.75 ~= within about 41.4 degrees of each other.\nlocal function LookingAtEachOther(p1, p2, threshold)\n    threshold = threshold or 0.75\n\n    local e1 = p1:EyeAngles()\n    local e2 = p2:EyeAngles()\n\n    local d1 = e1:Forward()\n    local d2 = e2:Forward()\n\n    local to2 = (p2:EyePos() - p1:EyePos()):GetNormalized()\n    local to1 = -to2\n\n    return d1:Dot(to2) >= threshold and d2:Dot(to1) >= threshold\nend\n``` \nReason: Dot products are cheaper than converting to angles and calling `math.acos`, and they directly test whether each player’s aim direction points toward the other."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13933,"startedAt":"2026-07-11T07:37:24.909Z","completedAt":"2026-07-11T07:37:38.848Z","answerBytes":230,"answerChars":230,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14555,"completionTokens":86,"totalTokens":14641,"reasoningTokens":14,"cachedTokens":13824},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: For a helper you control, the free function avoids method-call sugar and is the generally cheaper, clearer call style in Lua; the difference is small, but `SomeHelper(ply)` is the better default.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: For a helper you control, the free function avoids method-call sugar and is the generally cheaper, clearer call style in Lua; the difference is small, but `SomeHelper(ply)` is the better default."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12299,"startedAt":"2026-07-11T07:37:25.756Z","completedAt":"2026-07-11T07:37:38.075Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":129,"totalTokens":14677,"reasoningTokens":64,"cachedTokens":13824},"finalResponse":"```lua\nMsgN(\"debug: reached hot path\")\n```\nReason: `MsgN` writes directly to the console with less formatting work than `print`, so it is the cheaper choice for a hot-path debug line.","model_patch":"```lua\nMsgN(\"debug: reached hot path\")\n```\nReason: `MsgN` writes directly to the console with less formatting work than `print`, so it is the cheaper choice for a hot-path debug line."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4507,"startedAt":"2026-07-11T07:37:27.274Z","completedAt":"2026-07-11T07:37:31.783Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14558,"completionTokens":115,"totalTokens":14673,"reasoningTokens":29,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: For a large sequential array-like table, a numeric `for` is typically fastest because it avoids the iterator overhead of `pairs` and `ipairs` and uses direct indexed access.","model_patch":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: For a large sequential array-like table, a numeric `for` is typically fastest because it avoids the iterator overhead of `pairs` and `ipairs` and uses direct indexed access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14754,"startedAt":"2026-07-11T07:37:27.740Z","completedAt":"2026-07-11T07:37:42.556Z","answerBytes":795,"answerChars":795,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14566,"completionTokens":312,"totalTokens":14878,"reasoningTokens":29,"cachedTokens":0},"finalResponse":"```lua\n-- Faster than chaining DarkRP fn combinators: one pass, one output table.\n-- Example pipeline: keep numbers > 0, double them, stop after max_n items.\nlocal function filter_map_fast(list, pred, map, max_n)\n  local out = {}\n  local n = 0\n\n  for i = 1, #list do\n    local v = list[i]\n    if pred(v, i) then\n      n = n + 1\n      out[n] = map(v, i)\n      if max_n and n >= max_n then\n        break\n      end\n    end\n  end\n\n  return out, n\nend\n\n-- Usage.\nlocal input = { -2, -1, 0, 1, 2, 3, 4 }\nlocal result = filter_map_fast(input,\n  function(v) return v > 0 end,\n  function(v) return v * 2 end\n)\n\n-- result = { 2, 4, 6, 8 }\n```\nReason: It does the same filter/map work in a single numeric for-loop with no intermediate tables or combinator closures, so it cuts allocation and call overhead.","model_patch":"```lua\n-- Faster than chaining DarkRP fn combinators: one pass, one output table.\n-- Example pipeline: keep numbers > 0, double them, stop after max_n items.\nlocal function filter_map_fast(list, pred, map, max_n)\n  local out = {}\n  local n = 0\n\n  for i = 1, #list do\n    local v = list[i]\n    if pred(v, i) then\n      n = n + 1\n      out[n] = map(v, i)\n      if max_n and n >= max_n then\n        break\n      end\n    end\n  end\n\n  return out, n\nend\n\n-- Usage.\nlocal input = { -2, -1, 0, 1, 2, 3, 4 }\nlocal result = filter_map_fast(input,\n  function(v) return v > 0 end,\n  function(v) return v * 2 end\n)\n\n-- result = { 2, 4, 6, 8 }\n```\nReason: It does the same filter/map work in a single numeric for-loop with no intermediate tables or combinator closures, so it cuts allocation and call overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10708,"startedAt":"2026-07-11T07:37:28.193Z","completedAt":"2026-07-11T07:37:38.932Z","answerBytes":713,"answerChars":713,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14565,"completionTokens":208,"totalTokens":14773,"reasoningTokens":13,"cachedTokens":13824},"finalResponse":"```lua\nlocal cachedPlayers = {}\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", RefreshPlayerCache)\n\nhook.Add(\"Tick\", \"FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player work here\n        end\n    end\nend)\n\n-- optional: seed the cache on startup / script reload\nRefreshPlayerCache()\n``` \nReason: It avoids rebuilding `player.GetAll()` and the iterator work every tick by keeping a shared cache that is updated only on player join/leave events.","model_patch":"```lua\nlocal cachedPlayers = {}\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCacheOnJoin\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCacheOnLeave\", RefreshPlayerCache)\n\nhook.Add(\"Tick\", \"FastPlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- per-player work here\n        end\n    end\nend)\n\n-- optional: seed the cache on startup / script reload\nRefreshPlayerCache()\n``` \nReason: It avoids rebuilding `player.GetAll()` and the iterator work every tick by keeping a shared cache that is updated only on player join/leave events."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12937,"startedAt":"2026-07-11T07:37:28.275Z","completedAt":"2026-07-11T07:37:41.286Z","answerBytes":428,"answerChars":428,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":165,"totalTokens":14715,"reasoningTokens":36,"cachedTokens":0},"finalResponse":"```lua\nlocal PlayerData = setmetatable({}, { __mode = \"k\" })\n\n-- write\nPlayerData[ply] = PlayerData[ply] or {}\nPlayerData[ply].someField = value\n\n-- read\nlocal data = PlayerData[ply]\nlocal field = data and data.someField\n```\nReason: A weak-key side table keeps temporary per-player state out of the player object and gives faster repeated reads through one indexed table lookup, instead of repeated custom field access on `ply`.","model_patch":"```lua\nlocal PlayerData = setmetatable({}, { __mode = \"k\" })\n\n-- write\nPlayerData[ply] = PlayerData[ply] or {}\nPlayerData[ply].someField = value\n\n-- read\nlocal data = PlayerData[ply]\nlocal field = data and data.someField\n```\nReason: A weak-key side table keeps temporary per-player state out of the player object and gives faster repeated reads through one indexed table lookup, instead of repeated custom field access on `ply`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":13448,"startedAt":"2026-07-11T07:37:28.420Z","completedAt":"2026-07-11T07:37:41.871Z","answerBytes":533,"answerChars":533,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":174,"totalTokens":14727,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\n-- Faster for iteration: sequential number-indexed array\nlocal array = { \"a\", \"b\", \"c\" }\n\nfor i = 1, #array do\n    local v = array[i]\n    -- iterate values\nend\n\n-- Slower for iteration: string-keyed map\nlocal map = {\n    first = \"a\",\n    second = \"b\",\n    third = \"c\",\n}\n\nfor k, v in pairs(map) do\n    -- iterate key/value pairs\nend\n```\nReason: Sequential arrays are the faster table shape for fixed iteration because numeric indexing is simpler and more cache-friendly than string-keyed map lookup and generic pair traversal.","model_patch":"```lua\n-- Faster for iteration: sequential number-indexed array\nlocal array = { \"a\", \"b\", \"c\" }\n\nfor i = 1, #array do\n    local v = array[i]\n    -- iterate values\nend\n\n-- Slower for iteration: string-keyed map\nlocal map = {\n    first = \"a\",\n    second = \"b\",\n    third = \"c\",\n}\n\nfor k, v in pairs(map) do\n    -- iterate key/value pairs\nend\n```\nReason: Sequential arrays are the faster table shape for fixed iteration because numeric indexing is simpler and more cache-friendly than string-keyed map lookup and generic pair traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11050,"startedAt":"2026-07-11T07:37:28.807Z","completedAt":"2026-07-11T07:37:39.867Z","answerBytes":185,"answerChars":185,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":86,"totalTokens":14642,"reasoningTokens":21,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate numeric channels avoids allocating or unpacking a `Color` object in a hot draw loop, so it is the faster call style.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate numeric channels avoids allocating or unpacking a `Color` object in a hot draw loop, so it is the faster call style."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11485,"startedAt":"2026-07-11T07:37:30.686Z","completedAt":"2026-07-11T07:37:42.175Z","answerBytes":355,"answerChars":355,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14574,"completionTokens":120,"totalTokens":14694,"reasoningTokens":24,"cachedTokens":13824},"finalResponse":"```lua\nsql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: For a single Garry's Mod server with no sync needs, local SQLite is typically lower latency because it avoids network round trips and remote server overhead; MySQL only wins if you need external access, concurrency, or durability patterns beyond one server.","model_patch":"```lua\nsql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid))\n```\nReason: For a single Garry's Mod server with no sync needs, local SQLite is typically lower latency because it avoids network round trips and remote server overhead; MySQL only wins if you need external access, concurrency, or durability patterns beyond one server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16018,"startedAt":"2026-07-11T07:37:31.297Z","completedAt":"2026-07-11T07:37:47.398Z","answerBytes":639,"answerChars":639,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":246,"totalTokens":14793,"reasoningTokens":43,"cachedTokens":13824},"finalResponse":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamID(ply)\n    local sid = steamid_cache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamid_cache[ply] = sid\n    return sid\nend\n\nhook.Add(\"EntityRemoved\", \"SteamIDCache_Clear\", function(ent)\n    if steamid_cache[ent] ~= nil then\n        steamid_cache[ent] = nil\n    end\nend)\n\n-- hot path\n-- local sid = GetSteamID(ply)\n``` \nReason: Caches the SteamID per player entity so repeated hot-path calls avoid redoing the same method lookup, while the weak-key table lets entries fall out when the player entity is gone.\n","model_patch":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamID(ply)\n    local sid = steamid_cache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamid_cache[ply] = sid\n    return sid\nend\n\nhook.Add(\"EntityRemoved\", \"SteamIDCache_Clear\", function(ent)\n    if steamid_cache[ent] ~= nil then\n        steamid_cache[ent] = nil\n    end\nend)\n\n-- hot path\n-- local sid = GetSteamID(ply)\n``` \nReason: Caches the SteamID per player entity so repeated hot-path calls avoid redoing the same method lookup, while the weak-key table lets entries fall out when the player entity is gone.\n"}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":9954,"startedAt":"2026-07-11T07:37:31.786Z","completedAt":"2026-07-11T07:37:41.742Z","answerBytes":536,"answerChars":536,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":196,"totalTokens":14746,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\n-- Slow: repeated concatenation creates lots of intermediate strings.\nlocal out = \"\"\nfor i = 1, 10000 do\n    out = out .. \"piece\" .. i .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\"\n    parts[#parts + 1] = tostring(i)\n    parts[#parts + 1] = \"\\n\"\nend\nlocal fast = table.concat(parts)\n\nprint(#out, #fast)\n```\nReason: `table.concat` builds the final string in one pass, avoiding the repeated temporary strings and reallocations caused by `..` in a loop.","model_patch":"```lua\n-- Slow: repeated concatenation creates lots of intermediate strings.\nlocal out = \"\"\nfor i = 1, 10000 do\n    out = out .. \"piece\" .. i .. \"\\n\"\nend\n\n-- Faster: collect pieces, then join once.\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\"\n    parts[#parts + 1] = tostring(i)\n    parts[#parts + 1] = \"\\n\"\nend\nlocal fast = table.concat(parts)\n\nprint(#out, #fast)\n```\nReason: `table.concat` builds the final string in one pass, avoiding the repeated temporary strings and reallocations caused by `..` in a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12814,"startedAt":"2026-07-11T07:37:32.198Z","completedAt":"2026-07-11T07:37:45.031Z","answerBytes":249,"answerChars":249,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":95,"totalTokens":14645,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\ndraw.NoTexture()\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain filled rectangle directly, so it avoids the extra rounded-box path and is a slightly faster fit for non-rounded rects.","model_patch":"```lua\ndraw.NoTexture()\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain filled rectangle directly, so it avoids the extra rounded-box path and is a slightly faster fit for non-rounded rects."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13810,"startedAt":"2026-07-11T07:37:32.279Z","completedAt":"2026-07-11T07:37:46.093Z","answerBytes":442,"answerChars":442,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":228,"totalTokens":14777,"reasoningTokens":80,"cachedTokens":13824},"finalResponse":"```lua\nlocal font_name = \"DermaDefault\"\nlocal text = \"Hello world\"\nlocal x, y = 100, 100\n\nsurface.SetFont(font_name)\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n``` \nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the lightest path for a single-line string; it avoids the extra alignment, size, and outline work done by `draw.DrawText` and especially `SimpleTextOutlined`.","model_patch":"```lua\nlocal font_name = \"DermaDefault\"\nlocal text = \"Hello world\"\nlocal x, y = 100, 100\n\nsurface.SetFont(font_name)\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n``` \nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.DrawText` is the lightest path for a single-line string; it avoids the extra alignment, size, and outline work done by `draw.DrawText` and especially `SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13813,"startedAt":"2026-07-11T07:37:32.510Z","completedAt":"2026-07-11T07:37:46.355Z","answerBytes":150,"answerChars":150,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14543,"completionTokens":66,"totalTokens":14609,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nlocal n = #tbl\n```\nReason: In Garry's Mod Lua, the preferred way to get the length of a sequential array-like table is the length operator `#`.","model_patch":"```lua\nlocal n = #tbl\n```\nReason: In Garry's Mod Lua, the preferred way to get the length of a sequential array-like table is the length operator `#`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15433,"startedAt":"2026-07-11T07:37:33.286Z","completedAt":"2026-07-11T07:37:48.855Z","answerBytes":464,"answerChars":464,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":239,"totalTokens":14789,"reasoningTokens":116,"cachedTokens":13824},"finalResponse":"```lua\n-- Generally faster when you only need to drop the old table and do not need\n-- other references to see it emptied:\nt = {}\n\n-- Use this when you must keep the same table object alive for other references:\n-- table.Empty(t)\n``` \nReason: `t = {}` is usually faster for simply discarding a large table because it replaces the reference instead of clearing every entry in place; `table.Empty(t)` is only needed when other code still holds the same table object.","model_patch":"```lua\n-- Generally faster when you only need to drop the old table and do not need\n-- other references to see it emptied:\nt = {}\n\n-- Use this when you must keep the same table object alive for other references:\n-- table.Empty(t)\n``` \nReason: `t = {}` is usually faster for simply discarding a large table because it replaces the reference instead of clearing every entry in place; `table.Empty(t)` is only needed when other code still holds the same table object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15313,"startedAt":"2026-07-11T07:37:33.845Z","completedAt":"2026-07-11T07:37:49.805Z","answerBytes":415,"answerChars":415,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":175,"totalTokens":14725,"reasoningTokens":33,"cachedTokens":13824},"finalResponse":"```lua\n-- Fast membership check: use a set-style table with boolean true values.\nlocal allowed = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true,\n}\n\nlocal value = \"banana\"\n\nif allowed[value] then\n    print(\"exists\")\nend\n\n-- Slow on large lists:\n-- if table.HasValue(list, value) then ... end\n``` \nReason: direct table lookup is O(1) average time, while `table.HasValue` scans the list linearly.","model_patch":"```lua\n-- Fast membership check: use a set-style table with boolean true values.\nlocal allowed = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true,\n}\n\nlocal value = \"banana\"\n\nif allowed[value] then\n    print(\"exists\")\nend\n\n-- Slow on large lists:\n-- if table.HasValue(list, value) then ... end\n``` \nReason: direct table lookup is O(1) average time, while `table.HasValue` scans the list linearly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14071,"startedAt":"2026-07-11T07:37:35.190Z","completedAt":"2026-07-11T07:37:50.071Z","answerBytes":366,"answerChars":366,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":161,"totalTokens":14708,"reasoningTokens":31,"cachedTokens":13824},"finalResponse":"```lua\n-- Faster: put known fields in the constructor\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create empty table, then assign fields\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: The constructor is faster because Lua can allocate and initialize the table in one step, while post-assignment does separate table writes for each field.","model_patch":"```lua\n-- Faster: put known fields in the constructor\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create empty table, then assign fields\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: The constructor is faster because Lua can allocate and initialize the table in one step, while post-assignment does separate table writes for each field."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12425,"startedAt":"2026-07-11T07:37:35.397Z","completedAt":"2026-07-11T07:37:48.431Z","answerBytes":203,"answerChars":203,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14545,"completionTokens":76,"totalTokens":14621,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nlocal t = seq_table\nlocal v = t[math.random(#t)]\n``` \nReason: `table.Random` does extra work for generic tables; for a dense sequential array, picking a random index directly avoids that overhead.","model_patch":"```lua\nlocal t = seq_table\nlocal v = t[math.random(#t)]\n``` \nReason: `table.Random` does extra work for generic tables; for a dense sequential array, picking a random index directly avoids that overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8905,"startedAt":"2026-07-11T07:37:35.640Z","completedAt":"2026-07-11T07:37:44.915Z","answerBytes":132,"answerChars":132,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14542,"completionTokens":63,"totalTokens":14605,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the fastest clear form here; it avoids a function call and works well in tight loops.","model_patch":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the fastest clear form here; it avoids a function call and works well in tight loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4-mini@low","model_name_or_path":"gpt-5.4-mini@low","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":12316,"startedAt":"2026-07-11T07:37:35.695Z","completedAt":"2026-07-11T07:37:48.332Z","answerBytes":217,"answerChars":217,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14558,"completionTokens":81,"totalTokens":14639,"reasoningTokens":8,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: `player.GetAll()` returns the current connected players as an array, so `ipairs` is the direct loop for visiting each one in order.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: `player.GetAll()` returns the current connected players as an array, so `ipairs` is the direct loop for visiting each one in order."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17228,"startedAt":"2026-07-11T07:37:36.040Z","completedAt":"2026-07-11T07:37:53.272Z","answerBytes":260,"answerChars":260,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":475,"totalTokens":15024,"reasoningTokens":391,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent here\n    end\nend\n```\nReason: `ents.Iterator()` walks entities directly, so it filters `prop_physics` without allocating a table of all map entities first.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- visit ent here\n    end\nend\n```\nReason: `ents.Iterator()` walks entities directly, so it filters `prop_physics` without allocating a table of all map entities first."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":13471,"startedAt":"2026-07-11T07:37:36.604Z","completedAt":"2026-07-11T07:37:50.156Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":149,"totalTokens":14700,"reasoningTokens":72,"cachedTokens":13824},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and the string identifier `MyAddon.Think` names the callback so it can be referenced or removed later.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and the string identifier `MyAddon.Think` names the callback so it can be referenced or removed later."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":16768,"startedAt":"2026-07-11T07:37:36.649Z","completedAt":"2026-07-11T07:37:53.462Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":204,"totalTokens":14752,"reasoningTokens":131,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    -- safe to call entity methods here\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that returns false for `nil`, `NULL`, removed, or otherwise invalid entity references.","model_patch":"```lua\nif IsValid(ent) then\n    -- safe to call entity methods here\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check that returns false for `nil`, `NULL`, removed, or otherwise invalid entity references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14129,"startedAt":"2026-07-11T07:37:36.680Z","completedAt":"2026-07-11T07:37:50.827Z","answerBytes":186,"answerChars":186,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14541,"completionTokens":197,"totalTokens":14738,"reasoningTokens":134,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function()\n    -- handle incoming payload here\nend)\n```\nReason: `net.Receive` registers the callback that runs when the `MyAddon.Sync` message arrives.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function()\n    -- handle incoming payload here\nend)\n```\nReason: `net.Receive` registers the callback that runs when the `MyAddon.Sync` message arrives."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":16126,"startedAt":"2026-07-11T07:37:38.215Z","completedAt":"2026-07-11T07:37:54.342Z","answerBytes":310,"answerChars":310,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":613,"totalTokens":15160,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: reuse the cached zero angle instead of allocating a new one.\nlocal ang = ZERO_ANGLE\n```\nReason: Reusing one preallocated zero Angle avoids repeated allocations and is faster than calling `Angle()` every time; only copy it if you need to mutate the result.","model_patch":"```lua\nlocal ZERO_ANGLE = Angle(0, 0, 0)\n\n-- Hot path: reuse the cached zero angle instead of allocating a new one.\nlocal ang = ZERO_ANGLE\n```\nReason: Reusing one preallocated zero Angle avoids repeated allocations and is faster than calling `Angle()` every time; only copy it if you need to mutate the result."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14517,"startedAt":"2026-07-11T07:37:38.915Z","completedAt":"2026-07-11T07:37:53.602Z","answerBytes":214,"answerChars":214,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":215,"totalTokens":14771,"reasoningTokens":136,"cachedTokens":13824},"finalResponse":"```lua\nlocal myaddon_color = Color(255, 128, 0)\n\n-- frequent read\nlocal c = myaddon_color\n```\nReason: A flat local/upvalue avoids repeated table lookups (`myaddon.config.color`), so it is faster on a hot read path.","model_patch":"```lua\nlocal myaddon_color = Color(255, 128, 0)\n\n-- frequent read\nlocal c = myaddon_color\n```\nReason: A flat local/upvalue avoids repeated table lookups (`myaddon.config.color`), so it is faster on a hot read path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18361,"startedAt":"2026-07-11T07:37:38.931Z","completedAt":"2026-07-11T07:37:57.563Z","answerBytes":257,"answerChars":257,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":478,"totalTokens":15024,"reasoningTokens":387,"cachedTokens":13824},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred DarkRP API\n-- instead of: ply:GetNWString(\"job\")\n``` \nReason: `getDarkRPVar(\"job\")` uses DarkRP's own accessor for job state, while `GetNWString(\"job\")` reaches into the networked storage directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred DarkRP API\n-- instead of: ply:GetNWString(\"job\")\n``` \nReason: `getDarkRPVar(\"job\")` uses DarkRP's own accessor for job state, while `GetNWString(\"job\")` reaches into the networked storage directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12670,"startedAt":"2026-07-11T07:37:39.000Z","completedAt":"2026-07-11T07:37:51.878Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":118,"totalTokens":14665,"reasoningTokens":45,"cachedTokens":0},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= threshold * threshold then\n    -- within range\nend\n```\nReason: `DistToSqr` compares squared distance, so it avoids the extra square root when you only need a threshold check.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= threshold * threshold then\n    -- within range\nend\n```\nReason: `DistToSqr` compares squared distance, so it avoids the extra square root when you only need a threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18319,"startedAt":"2026-07-11T07:37:39.548Z","completedAt":"2026-07-11T07:37:57.869Z","answerBytes":203,"answerChars":203,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14543,"completionTokens":441,"totalTokens":14984,"reasoningTokens":375,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- visit ent here\nend\n``` \nReason: `ents.Iterator()` is the efficient wiki-recommended way to walk all entities without allocating the full `ents.GetAll()` table.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- visit ent here\nend\n``` \nReason: `ents.Iterator()` is the efficient wiki-recommended way to walk all entities without allocating the full `ents.GetAll()` table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":18389,"startedAt":"2026-07-11T07:37:39.872Z","completedAt":"2026-07-11T07:37:58.263Z","answerBytes":682,"answerChars":682,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14568,"completionTokens":508,"totalTokens":15076,"reasoningTokens":296,"cachedTokens":0},"finalResponse":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local pos = ply:GetPos()\n    local mins = pos - Vector(radius, radius, radius)\n    local maxs = pos + Vector(radius, radius, radius)\n\n    local nearby = ents.FindInBox(mins, maxs)\n    local radiusSqr = radius * radius\n    local out = {}\n\n    for i = 1, #nearby do\n        local ent = nearby[i]\n        if IsValid(ent) and ent ~= ply and ent:GetPos():DistToSqr(pos) <= radiusSqr then\n            out[#out + 1] = ent\n        end\n    end\n\n    return out\nend\n``` \nReason: `ents.FindInBox` is usually the cheaper built-in broad-phase query than `FindInSphere`, and it lets you keep the result tight with a squared-distance filter.","model_patch":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local pos = ply:GetPos()\n    local mins = pos - Vector(radius, radius, radius)\n    local maxs = pos + Vector(radius, radius, radius)\n\n    local nearby = ents.FindInBox(mins, maxs)\n    local radiusSqr = radius * radius\n    local out = {}\n\n    for i = 1, #nearby do\n        local ent = nearby[i]\n        if IsValid(ent) and ent ~= ply and ent:GetPos():DistToSqr(pos) <= radiusSqr then\n            out[#out + 1] = ent\n        end\n    end\n\n    return out\nend\n``` \nReason: `ents.FindInBox` is usually the cheaper built-in broad-phase query than `FindInSphere`, and it lets you keep the result tight with a squared-distance filter."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7721,"startedAt":"2026-07-11T07:37:41.340Z","completedAt":"2026-07-11T07:37:49.117Z","answerBytes":405,"answerChars":405,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":311,"totalTokens":14867,"reasoningTokens":184,"cachedTokens":0},"finalResponse":"```lua\nlocal function PlayersInSphere(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n``` \nReason: It scans only players instead of all entities, and `DistToSqr` avoids expensive square-root math.","model_patch":"```lua\nlocal function PlayersInSphere(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n``` \nReason: It scans only players instead of all entities, and `DistToSqr` avoids expensive square-root math."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12932,"startedAt":"2026-07-11T07:37:41.756Z","completedAt":"2026-07-11T07:37:54.698Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":198,"totalTokens":14747,"reasoningTokens":120,"cachedTokens":13824},"finalResponse":"```lua\nfor i = 1, n do\n    -- tight counting loop\nend\n```\nReason: In Garry's Mod Lua, the numeric `for` loop is generally faster than a `while` loop for simple counting because the VM handles the counter setup and increment more efficiently.","model_patch":"```lua\nfor i = 1, n do\n    -- tight counting loop\nend\n```\nReason: In Garry's Mod Lua, the numeric `for` loop is generally faster than a `while` loop for simple counting because the VM handles the counter setup and increment more efficiently."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14241,"startedAt":"2026-07-11T07:37:41.876Z","completedAt":"2026-07-11T07:37:56.120Z","answerBytes":289,"answerChars":289,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14561,"completionTokens":244,"totalTokens":14805,"reasoningTokens":155,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"NotifyAllPlayersOnce\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyCustomTick\", players)\nend)\n``` \nReason: one `hook.Run` does the dispatch work once, so it avoids the per-player call overhead of looping and invoking the hook system repeatedly.","model_patch":"```lua\nhook.Add(\"Think\", \"NotifyAllPlayersOnce\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyCustomTick\", players)\nend)\n``` \nReason: one `hook.Run` does the dispatch work once, so it avoids the per-player call overhead of looping and invoking the hook system repeatedly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13992,"startedAt":"2026-07-11T07:37:42.200Z","completedAt":"2026-07-11T07:37:56.224Z","answerBytes":439,"answerChars":439,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14554,"completionTokens":226,"totalTokens":14780,"reasoningTokens":77,"cachedTokens":13824},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local lp = LocalPlayer()\n    local health = lp:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 50, 50, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 50, 70, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 50, 90, color_white)\nend)\n```\nReason: `LocalPlayer():Health()` is computed once and reused, which removes two repeated lookups/calls in the same frame.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"DrawHealth\", function()\n    local lp = LocalPlayer()\n    local health = lp:Health()\n\n    draw.SimpleText(health, \"DermaDefault\", 50, 50, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 50, 70, color_white)\n    draw.SimpleText(health, \"DermaDefault\", 50, 90, color_white)\nend)\n```\nReason: `LocalPlayer():Health()` is computed once and reused, which removes two repeated lookups/calls in the same frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13805,"startedAt":"2026-07-11T07:37:42.558Z","completedAt":"2026-07-11T07:37:56.364Z","answerBytes":250,"answerChars":250,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14542,"completionTokens":146,"totalTokens":14688,"reasoningTokens":50,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(WHITE)\n    -- paint item...\nend\n```\nReason: `Color(255, 255, 255)` allocates a new color each iteration; caching the white color once removes that per-loop work.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nfor i = 1, #items do\n    surface.SetDrawColor(WHITE)\n    -- paint item...\nend\n```\nReason: `Color(255, 255, 255)` allocates a new color each iteration; caching the white color once removes that per-loop work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13391,"startedAt":"2026-07-11T07:37:44.944Z","completedAt":"2026-07-11T07:37:58.384Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14544,"completionTokens":122,"totalTokens":14666,"reasoningTokens":42,"cachedTokens":13824},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local v = sin(i * dt)\n    -- use v\nend\n``` \nReason: A local upvalue is faster to access than repeated table lookups like `math.sin` inside a hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n    local v = sin(i * dt)\n    -- use v\nend\n``` \nReason: A local upvalue is faster to access than repeated table lookups like `math.sin` inside a hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":18741,"startedAt":"2026-07-11T07:37:45.034Z","completedAt":"2026-07-11T07:38:03.778Z","answerBytes":370,"answerChars":370,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":631,"totalTokens":15178,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal _LocalPlayer = LocalPlayer\nlocal cachedLP\n\nlocal function LP()\n    if not IsValid(cachedLP) then\n        cachedLP = _LocalPlayer()\n    end\n    return cachedLP\nend\n\n-- hot path usage:\n-- local ply = LP()\n``` \nReason: `LocalPlayer` is resolved once into a local upvalue, and the player entity is cached so hot code avoids repeated global/function lookup work.","model_patch":"```lua\nlocal _LocalPlayer = LocalPlayer\nlocal cachedLP\n\nlocal function LP()\n    if not IsValid(cachedLP) then\n        cachedLP = _LocalPlayer()\n    end\n    return cachedLP\nend\n\n-- hot path usage:\n-- local ply = LP()\n``` \nReason: `LocalPlayer` is resolved once into a local upvalue, and the player entity is cached so hot code avoids repeated global/function lookup work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":10080,"startedAt":"2026-07-11T07:37:45.576Z","completedAt":"2026-07-11T07:37:55.715Z","answerBytes":582,"answerChars":582,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14561,"completionTokens":337,"totalTokens":14898,"reasoningTokens":144,"cachedTokens":13824},"finalResponse":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, dotThreshold)\n    dotThreshold = dotThreshold or 0.95 -- lower = looser cone\n\n    local eye1 = ply1:EyePos()\n    local eye2 = ply2:EyePos()\n\n    local to2 = (eye2 - eye1):GetNormalized()\n    local to1 = -to2\n\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n\n    return aim1:Dot(to2) >= dotThreshold\n       and aim2:Dot(to1) >= dotThreshold\nend\n``` \nReason: Dot products give a cheap cone test for alignment, so this checks mutual facing with only normalization and multiplies, no trigonometry.","model_patch":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, dotThreshold)\n    dotThreshold = dotThreshold or 0.95 -- lower = looser cone\n\n    local eye1 = ply1:EyePos()\n    local eye2 = ply2:EyePos()\n\n    local to2 = (eye2 - eye1):GetNormalized()\n    local to1 = -to2\n\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n\n    return aim1:Dot(to2) >= dotThreshold\n       and aim2:Dot(to1) >= dotThreshold\nend\n``` \nReason: Dot products give a cheap cone test for alignment, so this checks mutual facing with only normalization and multiplies, no trigonometry."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19961,"startedAt":"2026-07-11T07:37:46.213Z","completedAt":"2026-07-11T07:38:06.178Z","answerBytes":257,"answerChars":257,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":560,"totalTokens":15113,"reasoningTokens":481,"cachedTokens":13824},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: for a helper you control, the explicit-argument form is generally the better fit and is at least as fast, usually a bit faster, because `ply:SomeHelper()` is just method-call sugar with an extra table lookup/dispatch step.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: for a helper you control, the explicit-argument form is generally the better fit and is at least as fast, usually a bit faster, because `ply:SomeHelper()` is just method-call sugar with an extra table lookup/dispatch step."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15935,"startedAt":"2026-07-11T07:37:46.444Z","completedAt":"2026-07-11T07:38:02.479Z","answerBytes":157,"answerChars":157,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":304,"totalTokens":14852,"reasoningTokens":238,"cachedTokens":13824},"finalResponse":"```lua\nMsg(\"[debug] \", value, \"\\n\")\n```\nReason: `Msg` writes directly to the console without `print`'s extra formatting work, so it is cheaper in a hot path.","model_patch":"```lua\nMsg(\"[debug] \", value, \"\\n\")\n```\nReason: `Msg` writes directly to the console without `print`'s extra formatting work, so it is cheaper in a hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12456,"startedAt":"2026-07-11T07:37:47.408Z","completedAt":"2026-07-11T07:37:59.869Z","answerBytes":289,"answerChars":289,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":177,"totalTokens":14733,"reasoningTokens":78,"cachedTokens":13824},"finalResponse":"```lua\nlocal t = numbers\nlocal n = #t\nfor i = 1, n do\n    local v = t[i]\n    -- use v\nend\n```\nReason: numeric `for` with a cached length is typically fastest for a large sequential array-like table; `ipairs` adds iterator overhead, and `pairs` is slower and does not guarantee array order.","model_patch":"```lua\nlocal t = numbers\nlocal n = #t\nfor i = 1, n do\n    local v = t[i]\n    -- use v\nend\n```\nReason: numeric `for` with a cached length is typically fastest for a large sequential array-like table; `ipairs` adds iterator overhead, and `pairs` is slower and does not guarantee array order."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15459,"startedAt":"2026-07-11T07:37:47.556Z","completedAt":"2026-07-11T07:38:03.019Z","answerBytes":1070,"answerChars":1070,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14564,"completionTokens":798,"totalTokens":15362,"reasoningTokens":461,"cachedTokens":0},"finalResponse":"```lua\n-- Fused filter+map: one pass, one result table, no combinator chain overhead.\nlocal function filter_map(src, pred, map)\n    local out = {}\n    local n = 0\n\n    for i = 1, #src do\n        local v = src[i]\n        if pred(v, i) then\n            n = n + 1\n            out[n] = map(v, i)\n        end\n    end\n\n    return out\nend\n\n-- Example: keep valid players and map to their names.\nlocal players = player.GetAll()\nlocal names = filter_map(players,\n    function(p) return IsValid(p) and p:Alive() end,\n    function(p) return p:Nick() end\n)\n\n-- If you need more steps, fuse them into the same loop instead of chaining fn combinators.\nlocal function filter_map_map(src, pred, map1, map2)\n    local out = {}\n    local n = 0\n\n    for i = 1, #src do\n        local v = src[i]\n        if pred(v, i) then\n            n = n + 1\n            out[n] = map2(map1(v, i), i)\n        end\n    end\n\n    return out\nend\n``` \nReason: A fused numeric for-loop avoids DarkRP fn combinator overhead, extra closures, and intermediate tables while doing the same filter/map work in one pass.","model_patch":"```lua\n-- Fused filter+map: one pass, one result table, no combinator chain overhead.\nlocal function filter_map(src, pred, map)\n    local out = {}\n    local n = 0\n\n    for i = 1, #src do\n        local v = src[i]\n        if pred(v, i) then\n            n = n + 1\n            out[n] = map(v, i)\n        end\n    end\n\n    return out\nend\n\n-- Example: keep valid players and map to their names.\nlocal players = player.GetAll()\nlocal names = filter_map(players,\n    function(p) return IsValid(p) and p:Alive() end,\n    function(p) return p:Nick() end\n)\n\n-- If you need more steps, fuse them into the same loop instead of chaining fn combinators.\nlocal function filter_map_map(src, pred, map1, map2)\n    local out = {}\n    local n = 0\n\n    for i = 1, #src do\n        local v = src[i]\n        if pred(v, i) then\n            n = n + 1\n            out[n] = map2(map1(v, i), i)\n        end\n    end\n\n    return out\nend\n``` \nReason: A fused numeric for-loop avoids DarkRP fn combinator overhead, extra closures, and intermediate tables while doing the same filter/map work in one pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20208,"startedAt":"2026-07-11T07:37:48.247Z","completedAt":"2026-07-11T07:38:08.466Z","answerBytes":741,"answerChars":741,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14563,"completionTokens":717,"totalTokens":15280,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nif SERVER then\n    local cachedPlayers = {}\n\n    local function RefreshPlayerCache()\n        cachedPlayers = player.GetAll()\n    end\n\n    hook.Add(\"Initialize\", \"RefreshPlayerCache_Init\", RefreshPlayerCache)\n    hook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache_Join\", function()\n        RefreshPlayerCache()\n    end)\n    hook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache_Leave\", function()\n        RefreshPlayerCache()\n    end)\n\n    hook.Add(\"Think\", \"MyFastThink\", function()\n        for _, ply in ipairs(cachedPlayers) do\n            -- work with ply\n        end\n    end)\nend\n``` \nReason: The Think hook reuses a cached player list, so it avoids rebuilding `player.GetAll()` every tick and only refreshes when the roster changes.","model_patch":"```lua\nif SERVER then\n    local cachedPlayers = {}\n\n    local function RefreshPlayerCache()\n        cachedPlayers = player.GetAll()\n    end\n\n    hook.Add(\"Initialize\", \"RefreshPlayerCache_Init\", RefreshPlayerCache)\n    hook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache_Join\", function()\n        RefreshPlayerCache()\n    end)\n    hook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache_Leave\", function()\n        RefreshPlayerCache()\n    end)\n\n    hook.Add(\"Think\", \"MyFastThink\", function()\n        for _, ply in ipairs(cachedPlayers) do\n            -- work with ply\n        end\n    end)\nend\n``` \nReason: The Think hook reuses a cached player list, so it avoids rebuilding `player.GetAll()` every tick and only refreshes when the roster changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15519,"startedAt":"2026-07-11T07:37:48.429Z","completedAt":"2026-07-11T07:38:03.963Z","answerBytes":372,"answerChars":372,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":637,"totalTokens":15185,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal temp = setmetatable({}, { __mode = \"k\" }) -- weak keys for temporary player data\n\n-- write\nfunction SetTempData(ply, value)\n    temp[ply] = value\nend\n\n-- read\nfunction GetTempData(ply)\n    return temp[ply]\nend\n``` \nReason: a local side-table keyed by the player avoids repeated entity field/metatable lookups on `ply.someField`, which is faster for hot reads.","model_patch":"```lua\nlocal temp = setmetatable({}, { __mode = \"k\" }) -- weak keys for temporary player data\n\n-- write\nfunction SetTempData(ply, value)\n    temp[ply] = value\nend\n\n-- read\nfunction GetTempData(ply)\n    return temp[ply]\nend\n``` \nReason: a local side-table keyed by the player avoids repeated entity field/metatable lookups on `ply.someField`, which is faster for hot reads."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":11312,"startedAt":"2026-07-11T07:37:48.442Z","completedAt":"2026-07-11T07:37:59.891Z","answerBytes":575,"answerChars":575,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":291,"totalTokens":14842,"reasoningTokens":110,"cachedTokens":7168},"finalResponse":"```lua\n-- Faster for iteration: sequential number-indexed array\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n\n-- Slower for iteration: string-keyed map\nlocal map = {\n    first = \"alpha\",\n    second = \"beta\",\n    third = \"gamma\",\n}\n\nfor k, v in pairs(map) do\n    -- use k, v\nend\n``` \nReason: Sequential number-indexed arrays are the faster table shape for iteration because Lua can traverse them with simpler contiguous access, while string-keyed maps need hash lookups and general `pairs` traversal.","model_patch":"```lua\n-- Faster for iteration: sequential number-indexed array\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n\n-- Slower for iteration: string-keyed map\nlocal map = {\n    first = \"alpha\",\n    second = \"beta\",\n    third = \"gamma\",\n}\n\nfor k, v in pairs(map) do\n    -- use k, v\nend\n``` \nReason: Sequential number-indexed arrays are the faster table shape for iteration because Lua can traverse them with simpler contiguous access, while string-keyed maps need hash lookups and general `pairs` traversal."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9728,"startedAt":"2026-07-11T07:37:48.872Z","completedAt":"2026-07-11T07:37:58.610Z","answerBytes":254,"answerChars":254,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14560,"completionTokens":197,"totalTokens":14757,"reasoningTokens":111,"cachedTokens":13824},"finalResponse":"```lua\n-- Faster in hot draw paths: pass raw numbers instead of a Color object.\nsurface.SetDrawColor(255, 128, 64, 255)\n``` \nReason: Raw `r,g,b,a` numbers avoid the extra Color table/object handling, so they are the faster call style in tight draw loops.","model_patch":"```lua\n-- Faster in hot draw paths: pass raw numbers instead of a Color object.\nsurface.SetDrawColor(255, 128, 64, 255)\n``` \nReason: Raw `r,g,b,a` numbers avoid the extra Color table/object handling, so they are the faster call style in tight draw loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9299,"startedAt":"2026-07-11T07:37:49.154Z","completedAt":"2026-07-11T07:37:58.554Z","answerBytes":301,"answerChars":301,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14572,"completionTokens":209,"totalTokens":14781,"reasoningTokens":119,"cachedTokens":13824},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:1:12345'\")\n```\nReason: For a single Garry's Mod server with no cross-server sync, local SQLite usually has lower read/write latency than remote MySQL because it avoids network round trips and remote connection overhead.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:1:12345'\")\n```\nReason: For a single Garry's Mod server with no cross-server sync, local SQLite usually has lower read/write latency than remote MySQL because it avoids network round trips and remote connection overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14950,"startedAt":"2026-07-11T07:37:49.842Z","completedAt":"2026-07-11T07:38:04.895Z","answerBytes":651,"answerChars":651,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":587,"totalTokens":15136,"reasoningTokens":393,"cachedTokens":13824},"finalResponse":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" }) -- weak keys, auto-drops dead players\n\nlocal function SteamIDCached(ply)\n    local steamid = steamid_cache[ply]\n    if steamid ~= nil then\n        return steamid\n    end\n\n    steamid = ply:SteamID()\n    steamid_cache[ply] = steamid\n    return steamid\nend\n\n-- hot path\nfor _, ply in ipairs(player.GetAll()) do\n    local steamid = SteamIDCached(ply)\n    -- use steamid repeatedly here\nend\n``` \nReason: It turns repeated `ply:SteamID()` calls into one lookup per player and one weak-key table hit afterward, which is faster in hot paths and avoids leaking cache entries after players leave.","model_patch":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" }) -- weak keys, auto-drops dead players\n\nlocal function SteamIDCached(ply)\n    local steamid = steamid_cache[ply]\n    if steamid ~= nil then\n        return steamid\n    end\n\n    steamid = ply:SteamID()\n    steamid_cache[ply] = steamid\n    return steamid\nend\n\n-- hot path\nfor _, ply in ipairs(player.GetAll()) do\n    local steamid = SteamIDCached(ply)\n    -- use steamid repeatedly here\nend\n``` \nReason: It turns repeated `ply:SteamID()` calls into one lookup per player and one weak-key table hit afterward, which is faster in hot paths and avoids leaking cache entries after players leave."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12945,"startedAt":"2026-07-11T07:37:50.073Z","completedAt":"2026-07-11T07:38:03.019Z","answerBytes":445,"answerChars":445,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":421,"totalTokens":14969,"reasoningTokens":256,"cachedTokens":13824},"finalResponse":"```lua\n-- Slow: repeated .. creates a new string every time.\n-- local s = \"\"\n-- for i = 1, 10000 do\n--   s = s .. \"piece\" .. i\n-- end\n\n-- Fast: collect pieces, join once.\nlocal parts = {}\nlocal n = 0\n\nfor i = 1, 10000 do\n  n = n + 1\n  parts[n] = \"piece\" .. i\nend\n\nlocal big = table.concat(parts)\n``` \nReason: `table.concat` builds the final string once, so it avoids the repeated reallocations and copies caused by chaining `..` in a large loop.","model_patch":"```lua\n-- Slow: repeated .. creates a new string every time.\n-- local s = \"\"\n-- for i = 1, 10000 do\n--   s = s .. \"piece\" .. i\n-- end\n\n-- Fast: collect pieces, join once.\nlocal parts = {}\nlocal n = 0\n\nfor i = 1, 10000 do\n  n = n + 1\n  parts[n] = \"piece\" .. i\nend\n\nlocal big = table.concat(parts)\n``` \nReason: `table.concat` builds the final string once, so it avoids the repeated reallocations and copies caused by chaining `..` in a large loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7933,"startedAt":"2026-07-11T07:37:50.171Z","completedAt":"2026-07-11T07:37:58.118Z","answerBytes":247,"answerChars":247,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":213,"totalTokens":14763,"reasoningTokens":125,"cachedTokens":0},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `draw.RoundedBox(0, ...)` adds rounded-box overhead you do not need for plain rectangles; `surface.DrawRect` is the direct fill path and is slightly cheaper per draw.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `draw.RoundedBox(0, ...)` adds rounded-box overhead you do not need for plain rectangles; `surface.DrawRect` is the direct fill path and is slightly cheaper per draw."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8454,"startedAt":"2026-07-11T07:37:50.828Z","completedAt":"2026-07-11T07:37:59.284Z","answerBytes":420,"answerChars":420,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":252,"totalTokens":14801,"reasoningTokens":119,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n``` \nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.SetTextColor` + `surface.DrawText` is the lightest path for a single-line string; it avoids the extra wrapper work in `draw.DrawText`, and `SimpleTextOutlined` is slower because it draws the text multiple times for the outline.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n``` \nReason: `surface.SetFont` + `surface.SetTextPos` + `surface.SetTextColor` + `surface.DrawText` is the lightest path for a single-line string; it avoids the extra wrapper work in `draw.DrawText`, and `SimpleTextOutlined` is slower because it draws the text multiple times for the outline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4679,"startedAt":"2026-07-11T07:37:51.881Z","completedAt":"2026-07-11T07:37:56.562Z","answerBytes":199,"answerChars":199,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14543,"completionTokens":121,"totalTokens":14664,"reasoningTokens":57,"cachedTokens":13824},"finalResponse":"```lua\nlocal n = #tbl\n```\nReason: `#` is the standard length operator for sequential array-like tables in Lua, and is the preferred way to get their element count when the table is a proper sequence.","model_patch":"```lua\nlocal n = #tbl\n```\nReason: `#` is the standard length operator for sequential array-like tables in Lua, and is the preferred way to get their element count when the table is a proper sequence."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7685,"startedAt":"2026-07-11T07:37:52.363Z","completedAt":"2026-07-11T07:38:00.069Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14552,"completionTokens":338,"totalTokens":14890,"reasoningTokens":260,"cachedTokens":13824},"finalResponse":"```lua\n-- Generally faster when you can drop the old table reference.\nt = {}\n```\nReason: `t = {}` only rebinds the variable, while `table.Empty(t)` walks and clears every slot in the existing table, so rebinding is usually cheaper for large tables.","model_patch":"```lua\n-- Generally faster when you can drop the old table reference.\nt = {}\n```\nReason: `t = {}` only rebinds the variable, while `table.Empty(t)` walks and clears every slot in the existing table, so rebinding is usually cheaper for large tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6661,"startedAt":"2026-07-11T07:37:53.206Z","completedAt":"2026-07-11T07:37:59.869Z","answerBytes":252,"answerChars":252,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":262,"totalTokens":14812,"reasoningTokens":164,"cachedTokens":13824},"finalResponse":"```lua\nlocal allowed = {\n  weapon_pistol = true,\n  weapon_smg1 = true,\n  weapon_ar2 = true,\n}\n\nif allowed[value] then\n  -- value exists in the set\nend\n``` \nReason: Key lookup in a set table is O(1) average, while `table.HasValue` scans a list linearly.","model_patch":"```lua\nlocal allowed = {\n  weapon_pistol = true,\n  weapon_smg1 = true,\n  weapon_ar2 = true,\n}\n\nif allowed[value] then\n  -- value exists in the set\nend\n``` \nReason: Key lookup in a set table is O(1) average, while `table.HasValue` scans a list linearly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8115,"startedAt":"2026-07-11T07:37:53.279Z","completedAt":"2026-07-11T07:38:01.403Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":204,"totalTokens":14753,"reasoningTokens":131,"cachedTokens":13824},"finalResponse":"```lua\nlocal t = {\n    foo = 1,\n    bar = 2,\n}\n```\nReason: The constructor is usually faster because Lua can allocate and initialize the table in one step instead of creating `{}` and then doing separate field assignments.","model_patch":"```lua\nlocal t = {\n    foo = 1,\n    bar = 2,\n}\n```\nReason: The constructor is usually faster because Lua can allocate and initialize the table in one step instead of creating `{}` and then doing separate field assignments."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5914,"startedAt":"2026-07-11T07:37:53.469Z","completedAt":"2026-07-11T07:37:59.442Z","answerBytes":253,"answerChars":253,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":148,"totalTokens":14695,"reasoningTokens":70,"cachedTokens":13824},"finalResponse":"```lua\nlocal function RandomSequential(t)\n    return t[math.random(#t)]\nend\n```\nReason: `table.Random` handles general tables; for a sequential array, direct `#t` plus one indexed lookup is faster because it skips extra table traversal and key handling.","model_patch":"```lua\nlocal function RandomSequential(t)\n    return t[math.random(#t)]\nend\n```\nReason: `table.Random` handles general tables; for a sequential array, direct `#t` plus one indexed lookup is faster because it skips extra table traversal and key handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6469,"startedAt":"2026-07-11T07:37:53.621Z","completedAt":"2026-07-11T07:38:00.136Z","answerBytes":152,"answerChars":152,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14540,"completionTokens":184,"totalTokens":14724,"reasoningTokens":123,"cachedTokens":13824},"finalResponse":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the direct, allocation-free way to square a number and is faster than calling `math.pow` in a tight loop.","model_patch":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the direct, allocation-free way to square a number and is faster than calling `math.pow` in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4-mini@medium","model_name_or_path":"gpt-5.4-mini@medium","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":6750,"startedAt":"2026-07-11T07:37:54.344Z","completedAt":"2026-07-11T07:38:01.096Z","answerBytes":212,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14554,"completionTokens":181,"totalTokens":14735,"reasoningTokens":108,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: `player.GetAll()` returns the current player list, and `ipairs` is the idiomatic way to iterate that array-style table in Lua.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: `player.GetAll()` returns the current player list, and `ipairs` is the idiomatic way to iterate that array-style table in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11589,"startedAt":"2026-07-11T07:37:54.700Z","completedAt":"2026-07-11T07:38:06.296Z","answerBytes":257,"answerChars":257,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":601,"totalTokens":15150,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- do something with ent\n    end\nend\n```\nReason: `ents.Iterator()` walks entities one at a time, so you can filter `prop_physics` without building a full entity table.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if ent:GetClass() == \"prop_physics\" then\n        -- do something with ent\n    end\nend\n```\nReason: `ents.Iterator()` walks entities one at a time, so you can filter `prop_physics` without building a full entity table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4911,"startedAt":"2026-07-11T07:37:55.717Z","completedAt":"2026-07-11T07:38:00.633Z","answerBytes":169,"answerChars":169,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":182,"totalTokens":14735,"reasoningTokens":114,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback on Garry's Mod's `Think` hook under the identifier `MyAddon.Think`.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback on Garry's Mod's `Think` hook under the identifier `MyAddon.Think`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":6113,"startedAt":"2026-07-11T07:37:56.122Z","completedAt":"2026-07-11T07:38:02.237Z","answerBytes":177,"answerChars":177,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":226,"totalTokens":14776,"reasoningTokens":165,"cachedTokens":0},"finalResponse":"```lua\nif not IsValid(ent) then return end\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check for a valid, still-usable entity reference before calling entity methods.","model_patch":"```lua\nif not IsValid(ent) then return end\n```\nReason: `IsValid(ent)` is the standard Garry's Mod check for a valid, still-usable entity reference before calling entity methods."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6176,"startedAt":"2026-07-11T07:37:56.226Z","completedAt":"2026-07-11T07:38:02.403Z","answerBytes":212,"answerChars":212,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14541,"completionTokens":261,"totalTokens":14802,"reasoningTokens":189,"cachedTokens":13824},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` is the Garry's Mod API used to register a callback for an incoming net message by name.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message here\nend)\n```\nReason: `net.Receive` is the Garry's Mod API used to register a callback for an incoming net message by name."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":28565,"startedAt":"2026-07-11T07:37:56.388Z","completedAt":"2026-07-11T07:38:24.955Z","answerBytes":319,"answerChars":319,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":1651,"totalTokens":16198,"reasoningTokens":1552,"cachedTokens":0},"finalResponse":"```lua\nlocal zeroAngle = angle_zero\n\n-- Hot path: use the shared zero Angle instead of allocating a new one.\nlocal ang = zeroAngle\n``` \nReason: `angle_zero` is a shared zero-angle constant, so it avoids per-call `Angle()` allocation; if you need to mutate it, keep a reusable scratch `Angle` and call `:Zero()` on that.","model_patch":"```lua\nlocal zeroAngle = angle_zero\n\n-- Hot path: use the shared zero Angle instead of allocating a new one.\nlocal ang = zeroAngle\n``` \nReason: `angle_zero` is a shared zero-angle constant, so it avoids per-call `Angle()` allocation; if you need to mutate it, keep a reusable scratch `Angle` and call `:Zero()` on that."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6429,"startedAt":"2026-07-11T07:37:56.572Z","completedAt":"2026-07-11T07:38:03.018Z","answerBytes":201,"answerChars":201,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14554,"completionTokens":268,"totalTokens":14822,"reasoningTokens":201,"cachedTokens":0},"finalResponse":"```lua\nlocal addon_color = myaddon.config.color\n\nif addon_color then\n    -- use addon_color\nend\n```\nReason: a cached local/upvalue is faster to read than repeated nested table or global lookups in Lua.","model_patch":"```lua\nlocal addon_color = myaddon.config.color\n\nif addon_color then\n    -- use addon_color\nend\n```\nReason: a cached local/upvalue is faster to read than repeated nested table or global lookups in Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11710,"startedAt":"2026-07-11T07:37:57.564Z","completedAt":"2026-07-11T07:38:09.276Z","answerBytes":193,"answerChars":193,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":551,"totalTokens":15097,"reasoningTokens":478,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the job name as a DarkRPVar, so `ply:getDarkRPVar(\"job\")` is the supported API instead of reading the NWString directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP stores the job name as a DarkRPVar, so `ply:getDarkRPVar(\"job\")` is the supported API instead of reading the NWString directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5172,"startedAt":"2026-07-11T07:37:57.871Z","completedAt":"2026-07-11T07:38:03.044Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":180,"totalTokens":14729,"reasoningTokens":106,"cachedTokens":13824},"finalResponse":"```lua\nif v1:DistToSqr(v2) < (threshold * threshold) then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root, so it is the cheaper way to do a distance threshold check.","model_patch":"```lua\nif v1:DistToSqr(v2) < (threshold * threshold) then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root, so it is the cheaper way to do a distance threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11387,"startedAt":"2026-07-11T07:37:58.148Z","completedAt":"2026-07-11T07:38:09.564Z","answerBytes":230,"answerChars":230,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":588,"totalTokens":15135,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    -- visit each entity here\nend\n``` \nReason: `ents.Iterator()` is the efficient entity traversal path, so it avoids building the full `ents.GetAll()` table when a snapshot copy is not needed.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    -- visit each entity here\nend\n``` \nReason: `ents.Iterator()` is the efficient entity traversal path, so it avoids building the full `ents.GetAll()` table when a snapshot copy is not needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":8161,"startedAt":"2026-07-11T07:37:58.264Z","completedAt":"2026-07-11T07:38:06.428Z","answerBytes":360,"answerChars":360,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14564,"completionTokens":394,"totalTokens":14958,"reasoningTokens":286,"cachedTokens":13824},"finalResponse":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local center = ply:GetPos()\n    return ents.FindInSphere(center, radius)\nend\n\n-- example\nlocal entsNear = GetNearbyEntities(ply, 500)\n```\nReason: `ents.FindInSphere` is one of the faster built-in proximity queries for a player-centered radius check, and it avoids the heavier PVS-style visibility query.","model_patch":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local center = ply:GetPos()\n    return ents.FindInSphere(center, radius)\nend\n\n-- example\nlocal entsNear = GetNearbyEntities(ply, 500)\n```\nReason: `ents.FindInSphere` is one of the faster built-in proximity queries for a player-centered radius check, and it avoids the heavier PVS-style visibility query."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6342,"startedAt":"2026-07-11T07:37:58.387Z","completedAt":"2026-07-11T07:38:04.732Z","answerBytes":452,"answerChars":452,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14558,"completionTokens":251,"totalTokens":14809,"reasoningTokens":108,"cachedTokens":0},"finalResponse":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local out = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n``` \nReason: `player.GetAll()` only iterates players, and `DistToSqr` avoids the expensive square root and the extra entity scan/filter pass from `ents.FindInSphere`.","model_patch":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local out = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n``` \nReason: `player.GetAll()` only iterates players, and `DistToSqr` avoids the expensive square root and the extra entity scan/filter pass from `ents.FindInSphere`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7062,"startedAt":"2026-07-11T07:37:58.585Z","completedAt":"2026-07-11T07:38:05.725Z","answerBytes":205,"answerChars":205,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":258,"totalTokens":14807,"reasoningTokens":188,"cachedTokens":13824},"finalResponse":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: In Lua, a numeric `for` loop is generally faster than an equivalent `while` loop because the VM handles the loop counter and termination more efficiently.","model_patch":"```lua\nfor i = 1, n do\n    -- work\nend\n```\nReason: In Lua, a numeric `for` loop is generally faster than an equivalent `while` loop because the VM handles the loop counter and termination more efficiently."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9670,"startedAt":"2026-07-11T07:37:58.646Z","completedAt":"2026-07-11T07:38:08.384Z","answerBytes":379,"answerChars":379,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14561,"completionTokens":494,"totalTokens":15055,"reasoningTokens":378,"cachedTokens":13824},"finalResponse":"```lua\n-- Faster: dispatch once per tick and pass all players in one call.\nhook.Run(\"MyCustomLogicTick\", player.GetAll())\n\n-- Slower: dispatch once per player.\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"MyCustomLogicTick\", ply)\n-- end\n``` \nReason: One `hook.Run` does one dispatch and one argument setup; the loop version repeats that overhead for every player.","model_patch":"```lua\n-- Faster: dispatch once per tick and pass all players in one call.\nhook.Run(\"MyCustomLogicTick\", player.GetAll())\n\n-- Slower: dispatch once per player.\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"MyCustomLogicTick\", ply)\n-- end\n``` \nReason: One `hook.Run` does one dispatch and one argument setup; the loop version repeats that overhead for every player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8020,"startedAt":"2026-07-11T07:37:59.375Z","completedAt":"2026-07-11T07:38:07.602Z","answerBytes":461,"answerChars":461,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":307,"totalTokens":14863,"reasoningTokens":143,"cachedTokens":13824},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local lp = LocalPlayer()\n    if not IsValid(lp) then return end\n\n    local hp = lp:Health()\n\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 20, color_white)\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 40, color_white)\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 60, color_white)\nend)\n```\nReason: `LocalPlayer():Health()` is resolved once per frame instead of three times, so the hook does less repeated lookup work.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local lp = LocalPlayer()\n    if not IsValid(lp) then return end\n\n    local hp = lp:Health()\n\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 20, color_white)\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 40, color_white)\n    draw.SimpleText(hp, \"Trebuchet24\", 20, 60, color_white)\nend)\n```\nReason: `LocalPlayer():Health()` is resolved once per frame instead of three times, so the hook does less repeated lookup work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6870,"startedAt":"2026-07-11T07:37:59.395Z","completedAt":"2026-07-11T07:38:06.527Z","answerBytes":310,"answerChars":310,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":247,"totalTokens":14793,"reasoningTokens":129,"cachedTokens":0},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyPaintLoop\", function()\n    for i = 1, 100 do\n        surface.SetDrawColor(WHITE)\n        surface.DrawRect(i, 10, 1, 1)\n    end\nend)\n``` \nReason: Reuses one cached Color instead of allocating a new Color(255,255,255) table every loop iteration.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyPaintLoop\", function()\n    for i = 1, 100 do\n        surface.SetDrawColor(WHITE)\n        surface.DrawRect(i, 10, 1, 1)\n    end\nend)\n``` \nReason: Reuses one cached Color instead of allocating a new Color(255,255,255) table every loop iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8580,"startedAt":"2026-07-11T07:37:59.580Z","completedAt":"2026-07-11T07:38:08.596Z","answerBytes":174,"answerChars":174,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14544,"completionTokens":177,"totalTokens":14721,"reasoningTokens":106,"cachedTokens":13824},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, #angles do\n    sum = sum + sin(angles[i])\nend\n```\nReason: Localizing `math.sin` avoids repeating the table lookup inside the hot loop.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, #angles do\n    sum = sum + sin(angles[i])\nend\n```\nReason: Localizing `math.sin` avoids repeating the table lookup inside the hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18302,"startedAt":"2026-07-11T07:38:00.003Z","completedAt":"2026-07-11T07:38:18.591Z","answerBytes":477,"answerChars":477,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":1046,"totalTokens":15593,"reasoningTokens":907,"cachedTokens":0},"finalResponse":"```lua\nlocal cachedLP\n\nlocal function LP()\n    local lp = cachedLP\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n        cachedLP = lp\n    end\n    return lp\nend\n\n-- hot path\nlocal lp = LP()\nif IsValid(lp) then\n    -- reuse lp here instead of calling LocalPlayer() repeatedly\nend\n``` \nReason: cache the entity in a local upvalue and only refresh it when the cached value is missing or invalid, which avoids repeated global lookup and repeated engine calls on hot paths.","model_patch":"```lua\nlocal cachedLP\n\nlocal function LP()\n    local lp = cachedLP\n    if not IsValid(lp) then\n        lp = LocalPlayer()\n        cachedLP = lp\n    end\n    return lp\nend\n\n-- hot path\nlocal lp = LP()\nif IsValid(lp) then\n    -- reuse lp here instead of calling LocalPlayer() repeatedly\nend\n``` \nReason: cache the entity in a local upvalue and only refresh it when the cached value is missing or invalid, which avoids repeated global lookup and repeated engine calls on hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":13854,"startedAt":"2026-07-11T07:38:00.011Z","completedAt":"2026-07-11T07:38:14.161Z","answerBytes":538,"answerChars":534,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14561,"completionTokens":701,"totalTokens":15262,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal function ArePlayersRoughlyLookingAtEachOther(plyA, plyB, dotThreshold)\n    dotThreshold = dotThreshold or 0.8 -- higher = stricter cone\n\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= dotThreshold\n       and plyB:GetAimVector():Dot(bToA) >= dotThreshold\nend\n``` \nReason: Dot products give a cheap cone test for “roughly facing” without the extra cost of `math.acos`.","model_patch":"```lua\nlocal function ArePlayersRoughlyLookingAtEachOther(plyA, plyB, dotThreshold)\n    dotThreshold = dotThreshold or 0.8 -- higher = stricter cone\n\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= dotThreshold\n       and plyB:GetAimVector():Dot(bToA) >= dotThreshold\nend\n``` \nReason: Dot products give a cheap cone test for “roughly facing” without the extra cost of `math.acos`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9890,"startedAt":"2026-07-11T07:38:00.013Z","completedAt":"2026-07-11T07:38:10.203Z","answerBytes":163,"answerChars":163,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":397,"totalTokens":14950,"reasoningTokens":340,"cachedTokens":13824},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: a direct function call avoids method-call sugar and is generally a bit cheaper than `ply:SomeHelper()` for a helper you control.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: a direct function call avoids method-call sugar and is generally a bit cheaper than `ply:SomeHelper()` for a helper you control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7840,"startedAt":"2026-07-11T07:38:00.237Z","completedAt":"2026-07-11T07:38:08.190Z","answerBytes":154,"answerChars":154,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":255,"totalTokens":14803,"reasoningTokens":193,"cachedTokens":0},"finalResponse":"```lua\nMsgN(\"hot path debug\")\n```\nReason: `MsgN` writes directly to the console and skips `print`'s extra formatting work, so it is cheaper in a hot path.","model_patch":"```lua\nMsgN(\"hot path debug\")\n```\nReason: `MsgN` writes directly to the console and skips `print`'s extra formatting work, so it is cheaper in a hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7168,"startedAt":"2026-07-11T07:38:00.252Z","completedAt":"2026-07-11T07:38:07.543Z","answerBytes":244,"answerChars":244,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":253,"totalTokens":14809,"reasoningTokens":166,"cachedTokens":0},"finalResponse":"```lua\nlocal t = numbers\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: Numeric `for` is usually fastest for a dense sequential array because it avoids the iterator overhead of `pairs`/`ipairs` and gives direct indexed access.","model_patch":"```lua\nlocal t = numbers\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: Numeric `for` is usually fastest for a dense sequential array because it avoids the iterator overhead of `pairs`/`ipairs` and gives direct indexed access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13061,"startedAt":"2026-07-11T07:38:00.635Z","completedAt":"2026-07-11T07:38:13.698Z","answerBytes":539,"answerChars":539,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14562,"completionTokens":686,"totalTokens":15248,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal function aliveNamesByJob(players, jobId)\n    local out, n = {}, 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:Team() == jobId then\n            n = n + 1\n            out[n] = ply:Nick()\n        end\n    end\n\n    return out\nend\n\n-- Example:\n-- local names = aliveNamesByJob(player.GetAll(), TEAM_POLICE)\n``` \nReason: One numeric loop with no combinator chaining, no intermediate tables, and no extra closure dispatch does the same filter+map work with less overhead.","model_patch":"```lua\nlocal function aliveNamesByJob(players, jobId)\n    local out, n = {}, 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) and ply:Alive() and ply:Team() == jobId then\n            n = n + 1\n            out[n] = ply:Nick()\n        end\n    end\n\n    return out\nend\n\n-- Example:\n-- local names = aliveNamesByJob(player.GetAll(), TEAM_POLICE)\n``` \nReason: One numeric loop with no combinator chaining, no intermediate tables, and no extra closure dispatch does the same filter+map work with less overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13794,"startedAt":"2026-07-11T07:38:00.772Z","completedAt":"2026-07-11T07:38:14.570Z","answerBytes":671,"answerChars":671,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14565,"completionTokens":664,"totalTokens":15229,"reasoningTokens":480,"cachedTokens":0},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", RefreshPlayerCache)\n\nhook.Add(\"Think\", \"MyAddon.PlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- fast per-player work here\n        end\n    end\nend)\n``` \nReason: It avoids allocating and traversing a fresh `player.GetAll()` table every tick by reusing a cached list and rebuilding it only when the player list changes.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyAddon.RefreshPlayerCache\", RefreshPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"MyAddon.RefreshPlayerCache\", RefreshPlayerCache)\n\nhook.Add(\"Think\", \"MyAddon.PlayerLoop\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- fast per-player work here\n        end\n    end\nend)\n``` \nReason: It avoids allocating and traversing a fresh `player.GetAll()` table every tick by reusing a cached list and rebuilding it only when the player list changes."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20627,"startedAt":"2026-07-11T07:38:01.100Z","completedAt":"2026-07-11T07:38:21.729Z","answerBytes":570,"answerChars":570,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":1113,"totalTokens":15663,"reasoningTokens":931,"cachedTokens":13824},"finalResponse":"```lua\nlocal pdata = setmetatable({}, { __mode = \"k\" }) -- weak keys auto-drop when the player entity is gone\n\nlocal function GetPData(ply)\n    local t = pdata[ply]\n    if not t then\n        t = {}\n        pdata[ply] = t\n    end\n    return t\nend\n\n-- write once\nGetPData(ply).myField = value\n\n-- read often\nlocal data = pdata[ply]\nif data then\n    local v = data.myField\nend\n``` \nReason: `ply.someField` is replaced by a plain table lookup in a module-local cache, and caching `pdata[ply]` in a local makes repeated reads cheaper while avoiding per-entity field mutation.","model_patch":"```lua\nlocal pdata = setmetatable({}, { __mode = \"k\" }) -- weak keys auto-drop when the player entity is gone\n\nlocal function GetPData(ply)\n    local t = pdata[ply]\n    if not t then\n        t = {}\n        pdata[ply] = t\n    end\n    return t\nend\n\n-- write once\nGetPData(ply).myField = value\n\n-- read often\nlocal data = pdata[ply]\nif data then\n    local v = data.myField\nend\n``` \nReason: `ply.someField` is replaced by a plain table lookup in a module-local cache, and caching `pdata[ply]` in a local makes repeated reads cheaper while avoiding per-entity field mutation."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7564,"startedAt":"2026-07-11T07:38:01.591Z","completedAt":"2026-07-11T07:38:09.565Z","answerBytes":313,"answerChars":313,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":302,"totalTokens":14855,"reasoningTokens":200,"cachedTokens":13824},"finalResponse":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n``` \nReason: Sequential number-indexed arrays are faster to iterate in Lua than string-keyed maps because they support dense, cache-friendly numeric traversal with less lookup overhead.","model_patch":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    -- use v\nend\n``` \nReason: Sequential number-indexed arrays are faster to iterate in Lua than string-keyed maps because they support dense, cache-friendly numeric traversal with less lookup overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7366,"startedAt":"2026-07-11T07:38:02.400Z","completedAt":"2026-07-11T07:38:09.898Z","answerBytes":183,"answerChars":183,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14552,"completionTokens":276,"totalTokens":14828,"reasoningTokens":208,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing raw RGBA numbers avoids constructing or unpacking a `Color` table on every draw, which is the cheaper hot-path call.","model_patch":"```lua\nsurface.SetDrawColor(255, 128, 64, 255)\n```\nReason: Passing raw RGBA numbers avoids constructing or unpacking a `Color` table on every draw, which is the cheaper hot-path call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8238,"startedAt":"2026-07-11T07:38:02.478Z","completedAt":"2026-07-11T07:38:11.146Z","answerBytes":287,"answerChars":287,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14572,"completionTokens":362,"totalTokens":14934,"reasoningTokens":277,"cachedTokens":13824},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT value FROM playerdata WHERE steamid64 = \" .. sql.SQLStr(steamid64))\n```\nReason: For one Garry's Mod server with no sync requirement, local SQLite is typically lower latency because it avoids network round trips and uses an embedded on-disk database.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT value FROM playerdata WHERE steamid64 = \" .. sql.SQLStr(steamid64))\n```\nReason: For one Garry's Mod server with no sync requirement, local SQLite is typically lower latency because it avoids network round trips and uses an embedded on-disk database."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12208,"startedAt":"2026-07-11T07:38:02.788Z","completedAt":"2026-07-11T07:38:15.507Z","answerBytes":487,"answerChars":487,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":665,"totalTokens":15212,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function SteamIDCached(ply)\n    local steamid = steamid_cache[ply]\n    if steamid == nil then\n        steamid = ply:SteamID()\n        steamid_cache[ply] = steamid\n    end\n    return steamid\nend\n\n-- Hot path use:\n-- local sid = SteamIDCached(ply)\n``` \nReason: Caches each player's immutable SteamID once per entity, avoiding repeated method calls on the hot path while keeping entries eligible for garbage collection.","model_patch":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function SteamIDCached(ply)\n    local steamid = steamid_cache[ply]\n    if steamid == nil then\n        steamid = ply:SteamID()\n        steamid_cache[ply] = steamid\n    end\n    return steamid\nend\n\n-- Hot path use:\n-- local sid = SteamIDCached(ply)\n``` \nReason: Caches each player's immutable SteamID once per entity, avoiding repeated method calls on the hot path while keeping entries eligible for garbage collection."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":6121,"startedAt":"2026-07-11T07:38:03.178Z","completedAt":"2026-07-11T07:38:09.563Z","answerBytes":304,"answerChars":304,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":215,"totalTokens":14761,"reasoningTokens":107,"cachedTokens":13824},"finalResponse":"```lua\nlocal parts = {}\nlocal n = 0\n\nfor i = 1, 10000 do\n    n = n + 1\n    parts[n] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts)\n``` \nReason: `table.concat` builds the final string in one pass, while repeated `..` creates many intermediate strings and gets slower as the number of pieces grows.","model_patch":"```lua\nlocal parts = {}\nlocal n = 0\n\nfor i = 1, 10000 do\n    n = n + 1\n    parts[n] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts)\n``` \nReason: `table.concat` builds the final string in one pass, while repeated `..` creates many intermediate strings and gets slower as the number of pieces grows."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7334,"startedAt":"2026-07-11T07:38:03.197Z","completedAt":"2026-07-11T07:38:10.683Z","answerBytes":229,"answerChars":229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":265,"totalTokens":14815,"reasoningTokens":185,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, so it avoids the extra rounded-box path and is a bit cheaper for repeated solid-rect rendering.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` draws a plain rectangle directly, so it avoids the extra rounded-box path and is a bit cheaper for repeated solid-rect rendering."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12607,"startedAt":"2026-07-11T07:38:03.216Z","completedAt":"2026-07-11T07:38:16.088Z","answerBytes":514,"answerChars":514,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":669,"totalTokens":15220,"reasoningTokens":507,"cachedTokens":13824},"finalResponse":"```lua\n-- cache the font name outside the hot path if you can\nlocal fontName = \"DermaDefault\"\n\nhook.Add(\"HUDPaint\", \"FastTextDraw\", function()\n    surface.SetFont(fontName)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(\"Single-line text\")\nend)\n``` \nReason: `surface.DrawText` with a preselected font is the lightest per-frame path for plain one-line text; it avoids the extra alignment, sizing, and outline work in `draw.DrawText` and `draw.SimpleTextOutlined`.","model_patch":"```lua\n-- cache the font name outside the hot path if you can\nlocal fontName = \"DermaDefault\"\n\nhook.Add(\"HUDPaint\", \"FastTextDraw\", function()\n    surface.SetFont(fontName)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(\"Single-line text\")\nend)\n``` \nReason: `surface.DrawText` with a preselected font is the lightest per-frame path for plain one-line text; it avoids the extra alignment, sizing, and outline work in `draw.DrawText` and `draw.SimpleTextOutlined`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5186,"startedAt":"2026-07-11T07:38:03.245Z","completedAt":"2026-07-11T07:38:08.741Z","answerBytes":157,"answerChars":157,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14541,"completionTokens":165,"totalTokens":14706,"reasoningTokens":107,"cachedTokens":13824},"finalResponse":"```lua\nlocal n = #myTable\n```\nReason: `#` is the preferred operator for sequential array-like tables in Lua; `table.Count` is for generic tables, not arrays.","model_patch":"```lua\nlocal n = #myTable\n```\nReason: `#` is the preferred operator for sequential array-like tables in Lua; `table.Count` is for generic tables, not arrays."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9421,"startedAt":"2026-07-11T07:38:03.790Z","completedAt":"2026-07-11T07:38:13.252Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14550,"completionTokens":430,"totalTokens":14980,"reasoningTokens":363,"cachedTokens":13824},"finalResponse":"```lua\nt = {}\n```\nReason: Rebinding to a new table is generally faster for discarding a large table because it avoids clearing every element; use `table.Empty(t)` only when other references must see the same table emptied.","model_patch":"```lua\nt = {}\n```\nReason: Rebinding to a new table is generally faster for discarding a large table because it avoids clearing every element; use `table.Empty(t)` only when other references must see the same table emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6683,"startedAt":"2026-07-11T07:38:04.069Z","completedAt":"2026-07-11T07:38:10.910Z","answerBytes":284,"answerChars":284,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":209,"totalTokens":14755,"reasoningTokens":99,"cachedTokens":13824},"finalResponse":"```lua\nlocal allowed = {\n    [\"weapon_pistol\"] = true,\n    [\"weapon_smg1\"] = true,\n    [\"weapon_ar2\"] = true,\n}\n\nif allowed[weaponClass] then\n    -- exists in set\nend\n```\nReason: A keyed lookup in a set-style table is O(1) average time, while `table.HasValue` scans the list linearly.","model_patch":"```lua\nlocal allowed = {\n    [\"weapon_pistol\"] = true,\n    [\"weapon_smg1\"] = true,\n    [\"weapon_ar2\"] = true,\n}\n\nif allowed[weaponClass] then\n    -- exists in set\nend\n```\nReason: A keyed lookup in a set-style table is O(1) average time, while `table.HasValue` scans the list linearly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8801,"startedAt":"2026-07-11T07:38:04.827Z","completedAt":"2026-07-11T07:38:14.045Z","answerBytes":332,"answerChars":332,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":376,"totalTokens":14923,"reasoningTokens":252,"cachedTokens":0},"finalResponse":"```lua\n-- Faster for a small table with known fields\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create first, then assign fields\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: the table constructor builds the table with its fields in one step, so it avoids separate assignments and is typically faster.","model_patch":"```lua\n-- Faster for a small table with known fields\nlocal t = {\n    x = 1,\n    y = 2,\n    z = 3,\n}\n\n-- Slower: create first, then assign fields\n-- local t = {}\n-- t.x = 1\n-- t.y = 2\n-- t.z = 3\n```\nReason: the table constructor builds the table with its fields in one step, so it avoids separate assignments and is typically faster."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12587,"startedAt":"2026-07-11T07:38:05.150Z","completedAt":"2026-07-11T07:38:18.059Z","answerBytes":179,"answerChars":179,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14545,"completionTokens":244,"totalTokens":14789,"reasoningTokens":178,"cachedTokens":13824},"finalResponse":"```lua\nlocal function RandomSequential(t)\n    return t[math.random(#t)]\nend\n```\nReason: It picks a random index directly in O(1) instead of scanning the table like `table.Random`.","model_patch":"```lua\nlocal function RandomSequential(t)\n    return t[math.random(#t)]\nend\n```\nReason: It picks a random index directly in O(1) instead of scanning the table like `table.Random`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5923,"startedAt":"2026-07-11T07:38:05.845Z","completedAt":"2026-07-11T07:38:11.973Z","answerBytes":160,"answerChars":160,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14542,"completionTokens":180,"totalTokens":14722,"reasoningTokens":114,"cachedTokens":13824},"finalResponse":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the simplest and fastest way to square a number in a tight Lua loop; it avoids the overhead of `^` or `math.pow`.","model_patch":"```lua\nlocal xx = x * x\n```\nReason: `x * x` is the simplest and fastest way to square a number in a tight Lua loop; it avoids the overhead of `^` or `math.pow`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4-mini@high","model_name_or_path":"gpt-5.4-mini@high","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":5433,"startedAt":"2026-07-11T07:38:06.180Z","completedAt":"2026-07-11T07:38:11.647Z","answerBytes":243,"answerChars":243,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":171,"totalTokens":14727,"reasoningTokens":95,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- ply is each currently connected player\nend\n```\nReason: `player.GetAll()` returns the current connected players as an array, so `ipairs` is the matching loop for visiting each one in order.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- ply is each currently connected player\nend\n```\nReason: `player.GetAll()` returns the current connected players as an array, so `ipairs` is the matching loop for visiting each one in order."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":60159,"startedAt":"2026-07-11T07:38:06.427Z","completedAt":"2026-07-11T07:39:06.645Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":4067,"totalTokens":18616,"reasoningTokens":3989,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- process ent here\nend\n```\nReason: `ents.FindByClass` returns only `prop_physics` entities, so you avoid building a table of every entity in the map.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- process ent here\nend\n```\nReason: `ents.FindByClass` returns only `prop_physics` entities, so you avoid building a table of every entity in the map."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":6628,"startedAt":"2026-07-11T07:38:06.483Z","completedAt":"2026-07-11T07:38:13.156Z","answerBytes":189,"answerChars":189,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14555,"completionTokens":265,"totalTokens":14820,"reasoningTokens":194,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and `MyAddon.Think` is the identifier used to name that callback.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\nReason: `hook.Add` registers a callback for the `Think` hook, and `MyAddon.Think` is the identifier used to name that callback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":7248,"startedAt":"2026-07-11T07:38:06.535Z","completedAt":"2026-07-11T07:38:13.785Z","answerBytes":204,"answerChars":204,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":296,"totalTokens":14844,"reasoningTokens":224,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove() -- or any other method call\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod guard for nil, NULL, or deleted entities before calling methods on them.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove() -- or any other method call\nend\n```\nReason: `IsValid(ent)` is the standard Garry's Mod guard for nil, NULL, or deleted entities before calling methods on them."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16124,"startedAt":"2026-07-11T07:38:07.600Z","completedAt":"2026-07-11T07:38:24.124Z","answerBytes":192,"answerChars":192,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14541,"completionTokens":357,"totalTokens":14898,"reasoningTokens":292,"cachedTokens":13824},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle incoming data here\nend)\n```\nReason: This registers a callback that runs whenever the `MyAddon.Sync` net message is received.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle incoming data here\nend)\n```\nReason: This registers a callback that runs whenever the `MyAddon.Sync` net message is received."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":84150,"startedAt":"2026-07-11T07:38:07.932Z","completedAt":"2026-07-11T07:39:32.266Z","answerBytes":178,"answerChars":178,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":5245,"totalTokens":19792,"reasoningTokens":5178,"cachedTokens":13824},"finalResponse":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- hot path\nlocal ang = ZERO_ANGLE\n```\nReason: `angle_zero` is preallocated and zeroed, so you avoid constructing a new `Angle()` each time.","model_patch":"```lua\nlocal ZERO_ANGLE = angle_zero\n\n-- hot path\nlocal ang = ZERO_ANGLE\n```\nReason: `angle_zero` is preallocated and zeroed, so you avoid constructing a new `Angle()` each time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17762,"startedAt":"2026-07-11T07:38:08.192Z","completedAt":"2026-07-11T07:38:25.956Z","answerBytes":248,"answerChars":248,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":513,"totalTokens":15069,"reasoningTokens":432,"cachedTokens":13824},"finalResponse":"```lua\nlocal addon_color = Color(255, 0, 0)\nlocal c = addon_color\n```\nReason: A local/upvalue is the fastest read path in Lua because it avoids repeated table lookups; `myaddon.config.color` costs extra indexing, and globals are slower than locals.","model_patch":"```lua\nlocal addon_color = Color(255, 0, 0)\nlocal c = addon_color\n```\nReason: A local/upvalue is the fastest read path in Lua because it avoids repeated table lookups; `myaddon.config.color` costs extra indexing, and globals are slower than locals."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":36203,"startedAt":"2026-07-11T07:38:08.474Z","completedAt":"2026-07-11T07:38:44.681Z","answerBytes":223,"answerChars":223,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":1766,"totalTokens":16314,"reasoningTokens":1684,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP exposes the job name as a DarkRPVar, so `getDarkRPVar(\"job\")` is the supported accessor; `GetNWString(\"job\")` reaches into the raw networked string directly.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP exposes the job name as a DarkRPVar, so `getDarkRPVar(\"job\")` is the supported accessor; `GetNWString(\"job\")` reaches into the raw networked string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18120,"startedAt":"2026-07-11T07:38:08.476Z","completedAt":"2026-07-11T07:38:26.602Z","answerBytes":184,"answerChars":184,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":260,"totalTokens":14813,"reasoningTokens":188,"cachedTokens":0},"finalResponse":"```lua\nif pos1:DistToSqr(pos2) <= maxDist * maxDist then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root and is the preferred way to do a vector threshold check.","model_patch":"```lua\nif pos1:DistToSqr(pos2) <= maxDist * maxDist then\n    -- within range\nend\n```\nReason: `DistToSqr` avoids the square root and is the preferred way to do a vector threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":65713,"startedAt":"2026-07-11T07:38:08.686Z","completedAt":"2026-07-11T07:39:14.713Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":3884,"totalTokens":18431,"reasoningTokens":3810,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- visit ent here\nend\n```\nReason: `ents.Iterator()` walks entities without building the full `ents.GetAll()` table, so it is the efficient choice for a simple visit-each-entity loop.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- visit ent here\nend\n```\nReason: `ents.Iterator()` walks entities without building the full `ents.GetAll()` table, so it is the efficient choice for a simple visit-each-entity loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":20686,"startedAt":"2026-07-11T07:38:08.840Z","completedAt":"2026-07-11T07:38:29.990Z","answerBytes":246,"answerChars":246,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14566,"completionTokens":599,"totalTokens":15165,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal pos = ply:GetPos()\nlocal nearby = ents.FindInSphere(pos, 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query and is a common benchmark winner for simple nearby-entity lookups without the heavier cost of `FindInPVS`.","model_patch":"```lua\nlocal pos = ply:GetPos()\nlocal nearby = ents.FindInSphere(pos, 256)\n```\nReason: `ents.FindInSphere` is a fast built-in spatial query and is a common benchmark winner for simple nearby-entity lookups without the heavier cost of `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":22233,"startedAt":"2026-07-11T07:38:09.562Z","completedAt":"2026-07-11T07:38:32.296Z","answerBytes":482,"answerChars":482,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14560,"completionTokens":666,"totalTokens":15226,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:Alive() and ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n``` \nReason: `player.GetAll()` iterates only players, so it skips every non-player entity that `ents.FindInSphere` would scan, and `DistToSqr` avoids the square-root cost.","model_patch":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:Alive() and ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n``` \nReason: `player.GetAll()` iterates only players, so it skips every non-player entity that `ents.FindInSphere` would scan, and `DistToSqr` avoids the square-root cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18220,"startedAt":"2026-07-11T07:38:09.808Z","completedAt":"2026-07-11T07:38:28.259Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":482,"totalTokens":15033,"reasoningTokens":408,"cachedTokens":0},"finalResponse":"```lua\nfor i = 1, n do\n  -- tight counting loop\nend\n```\nReason: A numeric `for` loop is generally faster than a `while` loop for simple counting in Garry's Mod Lua because it has lower per-iteration overhead.","model_patch":"```lua\nfor i = 1, n do\n  -- tight counting loop\nend\n```\nReason: A numeric `for` loop is generally faster than a `while` loop for simple counting in Garry's Mod Lua because it has lower per-iteration overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":36326,"startedAt":"2026-07-11T07:38:09.855Z","completedAt":"2026-07-11T07:38:46.516Z","answerBytes":645,"answerChars":645,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14563,"completionTokens":1741,"totalTokens":16304,"reasoningTokens":1552,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Tick\", \"NotifyPlayersOnce\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyAddon_PlayerTickBatch\", players)\nend)\n\nhook.Add(\"MyAddon_PlayerTickBatch\", \"MyAddon_Logic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- per-player custom logic here\n        end\n    end\nend)\n\n-- slower pattern:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"MyAddon_PlayerTick\", ply)\n-- end\n``` \nReason: one hook dispatch plus one player-list pass is cheaper than calling hook.Run once per player, because hook.Run has fixed overhead on every call.","model_patch":"```lua\nhook.Add(\"Tick\", \"NotifyPlayersOnce\", function()\n    local players = player.GetAll()\n    hook.Run(\"MyAddon_PlayerTickBatch\", players)\nend)\n\nhook.Add(\"MyAddon_PlayerTickBatch\", \"MyAddon_Logic\", function(players)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- per-player custom logic here\n        end\n    end\nend)\n\n-- slower pattern:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"MyAddon_PlayerTick\", ply)\n-- end\n``` \nReason: one hook dispatch plus one player-list pass is cheaper than calling hook.Run once per player, because hook.Run has fixed overhead on every call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25335,"startedAt":"2026-07-11T07:38:09.897Z","completedAt":"2026-07-11T07:38:35.540Z","answerBytes":424,"answerChars":424,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14560,"completionTokens":982,"totalTokens":15542,"reasoningTokens":837,"cachedTokens":13824},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"Example\", function()\n    local lp = LocalPlayer()\n    local hp = lp:Health()\n\n    draw.SimpleText(hp, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(hp, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(hp, \"DermaDefault\", 20, 60, color_white)\nend)\n``` \nReason: Cache the player and health once per frame so the hook avoids repeating the same lookup and method call three times.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"Example\", function()\n    local lp = LocalPlayer()\n    local hp = lp:Health()\n\n    draw.SimpleText(hp, \"DermaDefault\", 20, 20, color_white)\n    draw.SimpleText(hp, \"DermaDefault\", 20, 40, color_white)\n    draw.SimpleText(hp, \"DermaDefault\", 20, 60, color_white)\nend)\n``` \nReason: Cache the player and health once per frame so the hook avoids repeating the same lookup and method call three times."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":27377,"startedAt":"2026-07-11T07:38:10.039Z","completedAt":"2026-07-11T07:38:37.961Z","answerBytes":363,"answerChars":363,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14546,"completionTokens":1162,"totalTokens":15708,"reasoningTokens":1034,"cachedTokens":13824},"finalResponse":"```lua\nlocal WHITE = color_white\n\nhook.Add(\"HUDPaint\", \"MyPaint\", function()\n    for i = 1, 100 do\n        surface.SetDrawColor(WHITE)\n        surface.DrawRect(i, 10, 8, 8)\n    end\nend)\n``` \nReason: `Color(255,255,255)` allocates a new color table every call; caching `color_white` (or one `Color(...)` created once) removes per-iteration allocation and GC churn.","model_patch":"```lua\nlocal WHITE = color_white\n\nhook.Add(\"HUDPaint\", \"MyPaint\", function()\n    for i = 1, 100 do\n        surface.SetDrawColor(WHITE)\n        surface.DrawRect(i, 10, 8, 8)\n    end\nend)\n``` \nReason: `Color(255,255,255)` allocates a new color table every call; caching `color_white` (or one `Color(...)` created once) removes per-iteration allocation and GC churn."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15942,"startedAt":"2026-07-11T07:38:10.515Z","completedAt":"2026-07-11T07:38:26.686Z","answerBytes":200,"answerChars":200,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":364,"totalTokens":14912,"reasoningTokens":284,"cachedTokens":13824},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n  sum = sum + sin(values[i])\nend\n```\nReason: `sin` is bound once, so the hot loop avoids repeated `math.sin` table lookups and uses a cheaper local access.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, n do\n  sum = sum + sin(values[i])\nend\n```\nReason: `sin` is bound once, so the hot loop avoids repeated `math.sin` table lookups and uses a cheaper local access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":57366,"startedAt":"2026-07-11T07:38:10.819Z","completedAt":"2026-07-11T07:39:08.377Z","answerBytes":495,"answerChars":495,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":3287,"totalTokens":17836,"reasoningTokens":3146,"cachedTokens":0},"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal cachedLP\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    cachedLP = LocalPlayer()\nend)\n\nhook.Add(\"HUDPaint\", \"UseCachedLocalPlayer\", function()\n    local lp = cachedLP\n    if not IsValid(lp) then return end\n\n    -- use lp here instead of calling LocalPlayer() repeatedly\nend)\n``` \nReason: cache the function and the returned player entity, then reuse the local in hot paths so you avoid repeated global lookups and repeated LocalPlayer() calls.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\nlocal cachedLP\n\nhook.Add(\"Think\", \"CacheLocalPlayer\", function()\n    cachedLP = LocalPlayer()\nend)\n\nhook.Add(\"HUDPaint\", \"UseCachedLocalPlayer\", function()\n    local lp = cachedLP\n    if not IsValid(lp) then return end\n\n    -- use lp here instead of calling LocalPlayer() repeatedly\nend)\n``` \nReason: cache the function and the returned player entity, then reuse the local in hot paths so you avoid repeated global lookups and repeated LocalPlayer() calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":20340,"startedAt":"2026-07-11T07:38:11.009Z","completedAt":"2026-07-11T07:38:31.357Z","answerBytes":557,"answerChars":557,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14563,"completionTokens":700,"totalTokens":15263,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal function ArePlayersRoughlyFacingEachOther(plyA, plyB, dotThreshold)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    dotThreshold = dotThreshold or 0.85 -- lower = wider cone\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= dotThreshold\n       and plyB:GetAimVector():Dot(bToA) >= dotThreshold\nend\n``` \nReason: Dot products are cheap and compare direction directly, so this avoids the extra cost of computing an angle with `math.acos`.","model_patch":"```lua\nlocal function ArePlayersRoughlyFacingEachOther(plyA, plyB, dotThreshold)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    dotThreshold = dotThreshold or 0.85 -- lower = wider cone\n\n    local aToB = (plyB:EyePos() - plyA:EyePos()):GetNormalized()\n    local bToA = -aToB\n\n    return plyA:GetAimVector():Dot(aToB) >= dotThreshold\n       and plyB:GetAimVector():Dot(bToA) >= dotThreshold\nend\n``` \nReason: Dot products are cheap and compare direction directly, so this avoids the extra cost of computing an angle with `math.acos`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19250,"startedAt":"2026-07-11T07:38:11.230Z","completedAt":"2026-07-11T07:38:30.658Z","answerBytes":188,"answerChars":188,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14557,"completionTokens":580,"totalTokens":15137,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: A plain function call avoids method lookup and implicit `self` passing, so it is generally a bit faster than `ply:SomeHelper()` for a helper you control.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: A plain function call avoids method lookup and implicit `self` passing, so it is generally a bit faster than `ply:SomeHelper()` for a helper you control."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":27201,"startedAt":"2026-07-11T07:38:11.726Z","completedAt":"2026-07-11T07:38:39.003Z","answerBytes":189,"answerChars":189,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14548,"completionTokens":1104,"totalTokens":15652,"reasoningTokens":1034,"cachedTokens":13824},"finalResponse":"```lua\nMsgN(\"[debug] health=\", health, \" pos=\", pos)\n```\nReason: `MsgN` writes straight to the console with less formatting overhead than `print`, so it is the cheaper choice in a hot path.","model_patch":"```lua\nMsgN(\"[debug] health=\", health, \" pos=\", pos)\n```\nReason: `MsgN` writes straight to the console with less formatting overhead than `print`, so it is the cheaper choice in a hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16027,"startedAt":"2026-07-11T07:38:11.975Z","completedAt":"2026-07-11T07:38:28.005Z","answerBytes":233,"answerChars":233,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14560,"completionTokens":390,"totalTokens":14950,"reasoningTokens":305,"cachedTokens":13824},"finalResponse":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: A numeric `for` avoids iterator overhead and is typically the fastest choice for dense sequential tables; `ipairs` is usually slower, and `pairs` is the slowest.","model_patch":"```lua\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\nReason: A numeric `for` avoids iterator overhead and is typically the fastest choice for dense sequential tables; `ipairs` is usually slower, and `pairs` is the slowest."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":92904,"startedAt":"2026-07-11T07:38:13.180Z","completedAt":"2026-07-11T07:39:46.157Z","answerBytes":584,"answerChars":584,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14564,"completionTokens":6396,"totalTokens":20960,"reasoningTokens":6214,"cachedTokens":0},"finalResponse":"```lua\n-- Replaces fn.Filter(...) + fn.Map(...) with one pass.\nlocal function activePlayerNames(players)\n    local out = {}\n    local n = 0\n    local isValid = IsValid\n    local spectator = TEAM_SPECTATOR\n\n    for i = 1, #players do\n        local ply = players[i]\n        if isValid(ply) and ply:Alive() and ply:Team() ~= spectator then\n            n = n + 1\n            out[n] = ply:Nick()\n        end\n    end\n\n    return out\nend\n```\nReason: one numeric `for` loop fuses filter and map, avoids intermediate tables and combinator dispatch, and keeps output packed with `out[n] = ...`.","model_patch":"```lua\n-- Replaces fn.Filter(...) + fn.Map(...) with one pass.\nlocal function activePlayerNames(players)\n    local out = {}\n    local n = 0\n    local isValid = IsValid\n    local spectator = TEAM_SPECTATOR\n\n    for i = 1, #players do\n        local ply = players[i]\n        if isValid(ply) and ply:Alive() and ply:Team() ~= spectator then\n            n = n + 1\n            out[n] = ply:Nick()\n        end\n    end\n\n    return out\nend\n```\nReason: one numeric `for` loop fuses filter and map, avoids intermediate tables and combinator dispatch, and keeps output packed with `out[n] = ...`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19712,"startedAt":"2026-07-11T07:38:13.373Z","completedAt":"2026-07-11T07:38:33.087Z","answerBytes":588,"answerChars":588,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14567,"completionTokens":680,"totalTokens":15247,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshCachedPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayers\", RefreshCachedPlayers)\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayers\", RefreshCachedPlayers)\n\nhook.Add(\"Tick\", \"MyPlayerLoop\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- work here\n        end\n    end\nend)\n``` \nReason: `player.GetAll()` allocates and scans every call; caching the table and refreshing only on join/leave removes that per-tick cost.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function RefreshCachedPlayers()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshCachedPlayers\", RefreshCachedPlayers)\nhook.Add(\"PlayerDisconnected\", \"RefreshCachedPlayers\", RefreshCachedPlayers)\n\nhook.Add(\"Tick\", \"MyPlayerLoop\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- work here\n        end\n    end\nend)\n``` \nReason: `player.GetAll()` allocates and scans every call; caching the table and refreshing only on join/leave removes that per-tick cost."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"timeout","detail":"CLI exceeded the attempt timeout.","durationMs":338054,"startedAt":"2026-07-11T07:38:13.699Z","completedAt":"2026-07-11T07:43:51.755Z","answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":{"promptTokens":69,"completionTokens":0,"totalTokens":69,"source":"estimated"},"finalResponse":null,"model_patch":null}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18527,"startedAt":"2026-07-11T07:38:13.827Z","completedAt":"2026-07-11T07:38:32.395Z","answerBytes":273,"answerChars":273,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":614,"totalTokens":15167,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    print(v)\nend\n``` \nReason: Sequential number-indexed arrays use Lua's array part and avoid hash lookup overhead, so they iterate faster than string-keyed maps.","model_patch":"```lua\nlocal values = {\n    \"alpha\",\n    \"beta\",\n    \"gamma\",\n}\n\nfor i = 1, #values do\n    local v = values[i]\n    print(v)\nend\n``` \nReason: Sequential number-indexed arrays use Lua's array part and avoid hash lookup overhead, so they iterate faster than string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12488,"startedAt":"2026-07-11T07:38:14.057Z","completedAt":"2026-07-11T07:38:26.559Z","answerBytes":148,"answerChars":148,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":425,"totalTokens":14981,"reasoningTokens":371,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Separate numeric channels are the faster hot-path call because they avoid the Color object path.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Separate numeric channels are the faster hot-path call because they avoid the Color object path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20375,"startedAt":"2026-07-11T07:38:14.163Z","completedAt":"2026-07-11T07:38:34.540Z","answerBytes":241,"answerChars":241,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14576,"completionTokens":590,"totalTokens":15166,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. SQLStr(steamid))\n```\nReason: Local SQLite is typically lower latency for a single Garry's Mod server because it avoids network round trips and runs in-process.","model_patch":"```lua\nlocal rows = sql.Query(\"SELECT value FROM player_data WHERE steamid = \" .. SQLStr(steamid))\n```\nReason: Local SQLite is typically lower latency for a single Garry's Mod server because it avoids network round trips and runs in-process."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19061,"startedAt":"2026-07-11T07:38:14.582Z","completedAt":"2026-07-11T07:38:33.659Z","answerBytes":515,"answerChars":515,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14551,"completionTokens":682,"totalTokens":15233,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local sid = steamid_cache[ply]\n    if sid == nil then\n        sid = ply:SteamID()\n        steamid_cache[ply] = sid\n    end\n    return sid\nend\n\n-- hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetSteamIDCached(ply)\n    -- use sid here\nend\n``` \nReason: It turns repeated method calls into one lookup per player, and the weak-key cache avoids leaking entries after players disappear.","model_patch":"```lua\nlocal steamid_cache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetSteamIDCached(ply)\n    local sid = steamid_cache[ply]\n    if sid == nil then\n        sid = ply:SteamID()\n        steamid_cache[ply] = sid\n    end\n    return sid\nend\n\n-- hot path\nfor i = 1, #players do\n    local ply = players[i]\n    local sid = GetSteamIDCached(ply)\n    -- use sid here\nend\n``` \nReason: It turns repeated method calls into one lookup per player, and the weak-key cache avoids leaking entries after players disappear."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":18766,"startedAt":"2026-07-11T07:38:15.514Z","completedAt":"2026-07-11T07:38:34.283Z","answerBytes":271,"answerChars":271,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14552,"completionTokens":613,"totalTokens":15165,"reasoningTokens":516,"cachedTokens":0},"finalResponse":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts)\n``` \nReason: `table.concat` joins the pieces in one pass, so it avoids the repeated reallocations and full-string copies caused by `..` inside a loop.","model_patch":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\" .. i\nend\n\nlocal result = table.concat(parts)\n``` \nReason: `table.concat` joins the pieces in one pass, so it avoids the repeated reallocations and full-string copies caused by `..` inside a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18400,"startedAt":"2026-07-11T07:38:16.105Z","completedAt":"2026-07-11T07:38:34.539Z","answerBytes":219,"answerChars":219,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14554,"completionTokens":595,"totalTokens":15149,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nsurface.SetDrawColor(col)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` skips the rounded-box path and draws a plain rectangle directly, so it has a bit less overhead than `draw.RoundedBox(0, ...)`.","model_patch":"```lua\nsurface.SetDrawColor(col)\nsurface.DrawRect(x, y, w, h)\n```\nReason: `surface.DrawRect` skips the rounded-box path and draws a plain rectangle directly, so it has a bit less overhead than `draw.RoundedBox(0, ...)`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":65444,"startedAt":"2026-07-11T07:38:18.069Z","completedAt":"2026-07-11T07:39:23.551Z","answerBytes":580,"answerChars":580,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14553,"completionTokens":3949,"totalTokens":18502,"reasoningTokens":3751,"cachedTokens":13824},"finalResponse":"```lua\nlocal font = \"FastHUDText\"\n\nsurface.CreateFont(font, {\n    font = \"Roboto\",\n    size = 22,\n    weight = 500,\n    antialias = true,\n})\n\nlocal text = \"Single-line text\"\nlocal x, y = 50, 50\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` is the lowest-overhead path for one-line HUD text; `draw.DrawText` adds extra formatting work, and `SimpleTextOutlined` draws the glyphs multiple times for the outline.","model_patch":"```lua\nlocal font = \"FastHUDText\"\n\nsurface.CreateFont(font, {\n    font = \"Roboto\",\n    size = 22,\n    weight = 500,\n    antialias = true,\n})\n\nlocal text = \"Single-line text\"\nlocal x, y = 50, 50\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text)\nend)\n```\nReason: `surface.DrawText` is the lowest-overhead path for one-line HUD text; `draw.DrawText` adds extra formatting work, and `SimpleTextOutlined` draws the glyphs multiple times for the outline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13360,"startedAt":"2026-07-11T07:38:18.619Z","completedAt":"2026-07-11T07:38:32.011Z","answerBytes":167,"answerChars":167,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":233,"totalTokens":14780,"reasoningTokens":172,"cachedTokens":13824},"finalResponse":"```lua\nlocal n = #myTable\n```\nReason: `#` is the standard Lua length operator and is the preferred way to get the size of a sequential array-like table in Garry's Mod.","model_patch":"```lua\nlocal n = #myTable\n```\nReason: `#` is the standard Lua length operator and is the preferred way to get the size of a sequential array-like table in Garry's Mod."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":61780,"startedAt":"2026-07-11T07:38:21.733Z","completedAt":"2026-07-11T07:39:23.514Z","answerBytes":221,"answerChars":221,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14552,"completionTokens":3695,"totalTokens":18247,"reasoningTokens":3624,"cachedTokens":13824},"finalResponse":"```lua\nt = {}\n```\nReason: `t = {}` is usually faster because it just rebinds the variable instead of walking the table and clearing each slot; use `table.Empty(t)` only if other references must see the same table emptied.","model_patch":"```lua\nt = {}\n```\nReason: `t = {}` is usually faster because it just rebinds the variable instead of walking the table and clearing each slot; use `table.Empty(t)` only if other references must see the same table emptied."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20952,"startedAt":"2026-07-11T07:38:24.135Z","completedAt":"2026-07-11T07:38:45.144Z","answerBytes":272,"answerChars":272,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14552,"completionTokens":622,"totalTokens":15174,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal allowed = {\n    [\"weapon_pistol\"] = true,\n    [\"weapon_smg1\"] = true,\n    [\"weapon_ar2\"] = true,\n}\n\nif allowed[weaponClass] then\n    -- exists in the set\nend\n```\nReason: `allowed[value]` is a direct hash lookup, while `table.HasValue` scans the list linearly.","model_patch":"```lua\nlocal allowed = {\n    [\"weapon_pistol\"] = true,\n    [\"weapon_smg1\"] = true,\n    [\"weapon_ar2\"] = true,\n}\n\nif allowed[weaponClass] then\n    -- exists in the set\nend\n```\nReason: `allowed[value]` is a direct hash lookup, while `table.HasValue` scans the list linearly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20384,"startedAt":"2026-07-11T07:38:25.023Z","completedAt":"2026-07-11T07:38:45.531Z","answerBytes":165,"answerChars":165,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14549,"completionTokens":582,"totalTokens":15131,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nlocal t = { x = 1, y = 2, z = 3 }\n```\nReason: The constructor sets the fields during table creation, so it avoids the extra separate writes you do after `{}`.","model_patch":"```lua\nlocal t = { x = 1, y = 2, z = 3 }\n```\nReason: The constructor sets the fields during table creation, so it avoids the extra separate writes you do after `{}`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18719,"startedAt":"2026-07-11T07:38:25.959Z","completedAt":"2026-07-11T07:38:44.681Z","answerBytes":196,"answerChars":196,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14547,"completionTokens":546,"totalTokens":15093,"reasoningTokens":482,"cachedTokens":13824},"finalResponse":"```lua\nlocal value = t[math.random(#t)]\n```\nReason: `table.Random` handles any table shape, but a sequential array can be indexed directly, which avoids its extra table scanning and type handling.","model_patch":"```lua\nlocal value = t[math.random(#t)]\n```\nReason: `table.Random` handles any table shape, but a sequential array can be indexed directly, which avoids its extra table scanning and type handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19322,"startedAt":"2026-07-11T07:38:26.566Z","completedAt":"2026-07-11T07:38:45.905Z","answerBytes":114,"answerChars":114,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14542,"completionTokens":571,"totalTokens":15113,"reasoningTokens":516,"cachedTokens":13824},"finalResponse":"```lua\nx * x\n```\nReason: `x * x` is the cheapest square in Lua; it avoids the extra overhead of `^` or `math.pow`.","model_patch":"```lua\nx * x\n```\nReason: `x * x` is the cheapest square in Lua; it avoids the extra overhead of `^` or `math.pow`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.4-mini@xhigh","model_name_or_path":"gpt-5.4-mini@xhigh","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":8199,"startedAt":"2026-07-11T07:38:26.611Z","completedAt":"2026-07-11T07:38:34.824Z","answerBytes":208,"answerChars":208,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":14556,"completionTokens":274,"totalTokens":14830,"reasoningTokens":205,"cachedTokens":13824},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- visit each connected player here\nend\n```\nReason: `player.GetAll()` returns the current player list, and `ipairs` cleanly iterates every connected player.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- visit each connected player here\nend\n```\nReason: `player.GetAll()` returns the current player list, and `ipairs` cleanly iterates every connected player."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10845,"startedAt":"2026-07-11T07:38:26.687Z","completedAt":"2026-07-11T07:38:37.534Z","answerBytes":275,"answerChars":275,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":844,"totalTokens":12686,"reasoningTokens":754,"cachedTokens":11520},"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if IsValid(ent) then\n        -- process ent\n    end\nend\n```\nReason: `ents.FindByClass` directly returns only matching `prop_physics` entities, so you avoid building and scanning a table of all map entities.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if IsValid(ent) then\n        -- process ent\n    end\nend\n```\nReason: `ents.FindByClass` directly returns only matching `prop_physics` entities, so you avoid building and scanning a table of all map entities."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":3057,"startedAt":"2026-07-11T07:38:28.194Z","completedAt":"2026-07-11T07:38:31.580Z","answerBytes":215,"answerChars":215,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":167,"totalTokens":12015,"reasoningTokens":91,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- minimal callback\nend)\n```\nReason: Use `hook.Add` with hook name `Think` and the unique identifier `MyAddon.Think` to register a callback on the Think loop.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- minimal callback\nend)\n```\nReason: Use `hook.Add` with hook name `Think` and the unique identifier `MyAddon.Think` to register a callback on the Think loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":10907,"startedAt":"2026-07-11T07:38:28.447Z","completedAt":"2026-07-11T07:38:39.431Z","answerBytes":224,"answerChars":224,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":345,"totalTokens":12188,"reasoningTokens":266,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: Use `IsValid(ent)` which is the Garry's Mod validity check that returns false for `nil`/`NULL`/deleted entities, so calling methods inside this guard is safe.","model_patch":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: Use `IsValid(ent)` which is the Garry's Mod validity check that returns false for `nil`/`NULL`/deleted entities, so calling methods inside this guard is safe."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14853,"startedAt":"2026-07-11T07:38:29.993Z","completedAt":"2026-07-11T07:38:44.848Z","answerBytes":333,"answerChars":333,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11834,"completionTokens":421,"totalTokens":12255,"reasoningTokens":324,"cachedTokens":0},"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    local payload = net.ReadTable()\n    -- handle payload here\nend)\n```\nReason: `net.Receive(messageName, callback)` is the Garry's Mod API for registering an incoming network message handler, and using `MyAddon.Sync` as the message name subscribes this function to that message.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    local payload = net.ReadTable()\n    -- handle payload here\nend)\n```\nReason: `net.Receive(messageName, callback)` is the Garry's Mod API for registering an incoming network message handler, and using `MyAddon.Sync` as the message name subscribes this function to that message."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12258,"startedAt":"2026-07-11T07:38:30.660Z","completedAt":"2026-07-11T07:38:42.920Z","answerBytes":465,"answerChars":465,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":1681,"totalTokens":13527,"reasoningTokens":1546,"cachedTokens":0},"finalResponse":"```lua\n-- one global cached zero angle provided by GMod\nlocal ZERO_ANGLE = angle_zero\n\nlocal function BorrowZeroAngle()\n    return Angle(ZERO_ANGLE) -- cheaper than Angle(0, 0, 0) each call\nend\n\nlocal function HotPath()\n    local ang = BorrowZeroAngle()\n    -- use ang ...\nend\n```\nReason: Reusing `angle_zero` and cloning it avoids rebuilding the zeroed angle from numeric constructor args every iteration, which is the common GMod hot-path allocation optimization.","model_patch":"```lua\n-- one global cached zero angle provided by GMod\nlocal ZERO_ANGLE = angle_zero\n\nlocal function BorrowZeroAngle()\n    return Angle(ZERO_ANGLE) -- cheaper than Angle(0, 0, 0) each call\nend\n\nlocal function HotPath()\n    local ang = BorrowZeroAngle()\n    -- use ang ...\nend\n```\nReason: Reusing `angle_zero` and cloning it avoids rebuilding the zeroed angle from numeric constructor args every iteration, which is the common GMod hot-path allocation optimization."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15067,"startedAt":"2026-07-11T07:38:31.361Z","completedAt":"2026-07-11T07:38:46.430Z","answerBytes":365,"answerChars":365,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11849,"completionTokens":552,"totalTokens":12401,"reasoningTokens":446,"cachedTokens":0},"finalResponse":"```lua\n-- Faster: cache the config in a flat local once, especially for hot-path reads\nlocal COLOR = myaddon.config.color\n\nlocal r = COLOR\n```\nReason: In Garry's Mod Lua, a flat local (`COLOR`) is a single upvalue access, while `myaddon.config.color` does repeated table/global lookups (hash/index chain) each time, so frequent reads are faster when stored locally.","model_patch":"```lua\n-- Faster: cache the config in a flat local once, especially for hot-path reads\nlocal COLOR = myaddon.config.color\n\nlocal r = COLOR\n```\nReason: In Garry's Mod Lua, a flat local (`COLOR`) is a single upvalue access, while `myaddon.config.color` does repeated table/global lookups (hash/index chain) each time, so frequent reads are faster when stored locally."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10951,"startedAt":"2026-07-11T07:38:31.635Z","completedAt":"2026-07-11T07:38:42.635Z","answerBytes":376,"answerChars":374,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":676,"totalTokens":12517,"reasoningTokens":544,"cachedTokens":11520},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- DarkRP job name helper\n-- or, when you only have team id:\n-- local jobName = team.GetName(ply:Team())\n```\nReason: `GetNWString(\"job\")` is low-level and deprecated for DarkRP job data; `getDarkRPVar(\"job\")` (or `team.GetName(ply:Team())` using `Team()`) is the idiomatic DarkRP API and stays in sync with DarkRP’s job system.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- DarkRP job name helper\n-- or, when you only have team id:\n-- local jobName = team.GetName(ply:Team())\n```\nReason: `GetNWString(\"job\")` is low-level and deprecated for DarkRP job data; `getDarkRPVar(\"job\")` (or `team.GetName(ply:Team())` using `Team()`) is the idiomatic DarkRP API and stays in sync with DarkRP’s job system."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11951,"startedAt":"2026-07-11T07:38:32.108Z","completedAt":"2026-07-11T07:38:44.175Z","answerBytes":343,"answerChars":343,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":321,"totalTokens":12165,"reasoningTokens":193,"cachedTokens":0},"finalResponse":"```lua\nlocal a = Vector(10, 20, 30)\nlocal b = Vector(12, 22, 29)\nlocal maxDist = 5\n\nif a:DistToSqr(b) < (maxDist * maxDist) then\n    print(\"Within range\")\nend\n```\nReason: `DistToSqr` returns squared distance between two vectors, so comparing it to `maxDist^2` avoids the costly square-root in `Distance()` and is the preferred threshold check.","model_patch":"```lua\nlocal a = Vector(10, 20, 30)\nlocal b = Vector(12, 22, 29)\nlocal maxDist = 5\n\nif a:DistToSqr(b) < (maxDist * maxDist) then\n    print(\"Within range\")\nend\n```\nReason: `DistToSqr` returns squared distance between two vectors, so comparing it to `maxDist^2` avoids the costly square-root in `Distance()` and is the preferred threshold check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":11740,"startedAt":"2026-07-11T07:38:32.320Z","completedAt":"2026-07-11T07:38:44.085Z","answerBytes":450,"answerChars":450,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":1156,"totalTokens":12994,"reasoningTokens":1031,"cachedTokens":11520},"finalResponse":"```lua\n-- Visit every entity, using the iterator when available.\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        -- use ent\n        print(ent)\n    end\nelse\n    -- Fallback for builds where ents.Iterator() is unavailable.\n    for _, ent in ipairs(ents.GetAll()) do\n        print(ent)\n    end\nend\n```\nReason: ents.Iterator is the wiki-recommended lightweight entity iterator when present, with ents.GetAll() as a compatibility fallback.","model_patch":"```lua\n-- Visit every entity, using the iterator when available.\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        -- use ent\n        print(ent)\n    end\nelse\n    -- Fallback for builds where ents.Iterator() is unavailable.\n    for _, ent in ipairs(ents.GetAll()) do\n        print(ent)\n    end\nend\n```\nReason: ents.Iterator is the wiki-recommended lightweight entity iterator when present, with ents.GetAll() as a compatibility fallback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12091,"startedAt":"2026-07-11T07:38:32.400Z","completedAt":"2026-07-11T07:38:44.506Z","answerBytes":679,"answerChars":679,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11861,"completionTokens":1312,"totalTokens":13173,"reasoningTokens":1098,"cachedTokens":11520},"finalResponse":"```lua\nlocal function FindNearbyEntitiesCheap(ply, radius)\n    local origin = ply:GetPos()\n    local r = radius or 256\n    local ext = Vector(r, r, r)\n    local candidates = ents.FindInBox(origin - ext, origin + ext)\n\n    local r2 = r * r\n    local out = {}\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and origin:DistToSqr(ent:GetPos()) <= r2 then\n            out[#out + 1] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: `ents.FindInBox` is a fast built-in broad-phase spatial query; filtering with `DistToSqr` avoids expensive sqrt while keeping the result bounded near the player without using `FindInPVS`.","model_patch":"```lua\nlocal function FindNearbyEntitiesCheap(ply, radius)\n    local origin = ply:GetPos()\n    local r = radius or 256\n    local ext = Vector(r, r, r)\n    local candidates = ents.FindInBox(origin - ext, origin + ext)\n\n    local r2 = r * r\n    local out = {}\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and origin:DistToSqr(ent:GetPos()) <= r2 then\n            out[#out + 1] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: `ents.FindInBox` is a fast built-in broad-phase spatial query; filtering with `DistToSqr` avoids expensive sqrt while keeping the result bounded near the player without using `FindInPVS`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11641,"startedAt":"2026-07-11T07:38:33.091Z","completedAt":"2026-07-11T07:38:44.847Z","answerBytes":880,"answerChars":880,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":955,"totalTokens":12806,"reasoningTokens":702,"cachedTokens":11520},"finalResponse":"```lua\n-- Server-side: check only players, avoid ents.FindInSphere + class filtering\nlocal function GetPlayersInRadius(pos, radius, includeBots)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if IsValid(ply)\n            and (includeBots or not ply:IsBot())\n            and ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n\n-- Example\nlocal origin = Vector(100, 200, 300)\nlocal nearby = GetPlayersInRadius(origin, 500)\nfor i = 1, #nearby do\n    local ply = nearby[i]\n    -- do work for each nearby player\nend\n``` \nReason: Iterating `player.GetAll()` and doing `DistToSqr` checks limits work to player entities only, avoids allocating and traversing all entities from `ents.FindInSphere`, and avoids expensive square-root distance calls.","model_patch":"```lua\n-- Server-side: check only players, avoid ents.FindInSphere + class filtering\nlocal function GetPlayersInRadius(pos, radius, includeBots)\n    local radiusSqr = radius * radius\n    local result = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if IsValid(ply)\n            and (includeBots or not ply:IsBot())\n            and ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n\n    return result\nend\n\n-- Example\nlocal origin = Vector(100, 200, 300)\nlocal nearby = GetPlayersInRadius(origin, 500)\nfor i = 1, #nearby do\n    local ply = nearby[i]\n    -- do work for each nearby player\nend\n``` \nReason: Iterating `player.GetAll()` and doing `DistToSqr` checks limits work to player entities only, avoids allocating and traversing all entities from `ents.FindInSphere`, and avoids expensive square-root distance calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":10836,"startedAt":"2026-07-11T07:38:33.666Z","completedAt":"2026-07-11T07:38:44.506Z","answerBytes":352,"answerChars":352,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":592,"totalTokens":12440,"reasoningTokens":464,"cachedTokens":11520},"finalResponse":"```lua\nlocal i = 1\nlocal n = 1000000\nlocal count = 0\n\nwhile i <= n do\n    count = count + 1\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a tight counting loop is typically faster with a manual `while` loop (`local i = 1; while i <= n do ...; i = i + 1 end`) because it uses the minimal increment-and-compare path without numeric-for loop overhead.","model_patch":"```lua\nlocal i = 1\nlocal n = 1000000\nlocal count = 0\n\nwhile i <= n do\n    count = count + 1\n    i = i + 1\nend\n```\nReason: In Garry's Mod Lua, a tight counting loop is typically faster with a manual `while` loop (`local i = 1; while i <= n do ...; i = i + 1 end`) because it uses the minimal increment-and-compare path without numeric-for loop overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11165,"startedAt":"2026-07-11T07:38:34.326Z","completedAt":"2026-07-11T07:38:45.524Z","answerBytes":680,"answerChars":680,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11854,"completionTokens":725,"totalTokens":12579,"reasoningTokens":524,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, not one per player.\nlocal hookName = \"CustomPlayersTick\"\n\nhook.Add(\"Think\", \"NotifyPlayersTick_Forwarder\", function()\n    local players = player.GetHumans() -- or player.GetAll()\n    hook.Run(hookName, players, CurTime())\nend)\n\nhook.Add(hookName, \"HandleAllPlayersTick\", function(players, now)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom logic for this player\n        end\n    end\nend)\n```\nReason: Dispatching `hook.Run` once per tick is faster because it reduces hook lookup/call overhead from N times to 1 and lets one listener handle the player loop in a single pass.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, not one per player.\nlocal hookName = \"CustomPlayersTick\"\n\nhook.Add(\"Think\", \"NotifyPlayersTick_Forwarder\", function()\n    local players = player.GetHumans() -- or player.GetAll()\n    hook.Run(hookName, players, CurTime())\nend)\n\nhook.Add(hookName, \"HandleAllPlayersTick\", function(players, now)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom logic for this player\n        end\n    end\nend)\n```\nReason: Dispatching `hook.Run` once per tick is faster because it reduces hook lookup/call overhead from N times to 1 and lets one listener handle the player loop in a single pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11647,"startedAt":"2026-07-11T07:38:34.562Z","completedAt":"2026-07-11T07:38:46.236Z","answerBytes":727,"answerChars":727,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11849,"completionTokens":888,"totalTokens":12737,"reasoningTokens":642,"cachedTokens":11520},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local lp = LocalPlayer()\n    if not IsValid(lp) then return end\n\n    local health = lp:Health() -- single fetch this frame\n    local txt = \"Health: \" .. health\n    local barW = math.Clamp(health, 0, 100) * 2\n\n    draw.SimpleText(txt, \"DermaDefault\", 16, 16, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText((\"HP: %d\"):format(health), \"DermaDefault\", 16, 34, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.RoundedBox(0, 16, 58, barW, 12, Color(220, 40, 40, 220))\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once, then reuse the `health` value across all three HUD draw calls, avoiding repeated cross-boundary calls in the same frame.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local lp = LocalPlayer()\n    if not IsValid(lp) then return end\n\n    local health = lp:Health() -- single fetch this frame\n    local txt = \"Health: \" .. health\n    local barW = math.Clamp(health, 0, 100) * 2\n\n    draw.SimpleText(txt, \"DermaDefault\", 16, 16, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText((\"HP: %d\"):format(health), \"DermaDefault\", 16, 34, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.RoundedBox(0, 16, 58, barW, 12, Color(220, 40, 40, 220))\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once, then reuse the `health` value across all three HUD draw calls, avoiding repeated cross-boundary calls in the same frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":10856,"startedAt":"2026-07-11T07:38:34.566Z","completedAt":"2026-07-11T07:38:45.526Z","answerBytes":658,"answerChars":658,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11839,"completionTokens":735,"totalTokens":12574,"reasoningTokens":525,"cachedTokens":11520},"finalResponse":"```lua\nlocal WHITE_R, WHITE_G, WHITE_B, WHITE_A = 255, 255, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    local t = items\n    local n = #t\n    if n == 0 then return end\n\n    -- set color once, reused for every draw call in the loop\n    surface.SetDrawColor(WHITE_R, WHITE_G, WHITE_B, WHITE_A)\n\n    for i = 1, n do\n        local itm = t[i]\n        surface.DrawRect(itm.x, itm.y, itm.w, itm.h)\n    end\nend)\n```\nReason: Calling `Color(...)` inside the hot loop allocates per-iteration color data, while caching numeric components (or the color) once and reusing `surface.SetDrawColor` removes repeated allocations and lowers per-frame overhead.","model_patch":"```lua\nlocal WHITE_R, WHITE_G, WHITE_B, WHITE_A = 255, 255, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    local t = items\n    local n = #t\n    if n == 0 then return end\n\n    -- set color once, reused for every draw call in the loop\n    surface.SetDrawColor(WHITE_R, WHITE_G, WHITE_B, WHITE_A)\n\n    for i = 1, n do\n        local itm = t[i]\n        surface.DrawRect(itm.x, itm.y, itm.w, itm.h)\n    end\nend)\n```\nReason: Calling `Color(...)` inside the hot loop allocates per-iteration color data, while caching numeric components (or the color) once and reusing `surface.SetDrawColor` removes repeated allocations and lowers per-frame overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10996,"startedAt":"2026-07-11T07:38:34.851Z","completedAt":"2026-07-11T07:38:45.912Z","answerBytes":302,"answerChars":302,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":276,"totalTokens":12119,"reasoningTokens":171,"cachedTokens":11520},"finalResponse":"```lua\nlocal sin = math.sin -- cache lookup once\n\nfor i = 1, 1000000 do\n    local v = sin(i * 0.1)\n    -- use v ...\nend\n```\nReason: Lua resolves globals each call, so caching `math.sin` in a local variable turns one table lookup into one-time setup and makes each loop call a fast local upvalue access.","model_patch":"```lua\nlocal sin = math.sin -- cache lookup once\n\nfor i = 1, 1000000 do\n    local v = sin(i * 0.1)\n    -- use v ...\nend\n```\nReason: Lua resolves globals each call, so caching `math.sin` in a local variable turns one table lookup into one-time setup and makes each loop call a fast local upvalue access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11763,"startedAt":"2026-07-11T07:38:35.705Z","completedAt":"2026-07-11T07:38:47.569Z","answerBytes":776,"answerChars":776,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":983,"totalTokens":12825,"reasoningTokens":750,"cachedTokens":11520},"finalResponse":"```lua\n-- cache.lua\nlocal lp\n\nlocal function refreshLocalPlayer()\n    local p = LocalPlayer()\n    if IsValid(p) then\n        lp = p\n    end\nend\n\n-- one-time setup when client is ready\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", refreshLocalPlayer)\n\n-- safety: player can be nil briefly; repair lazily\nlocal function getLocalPlayer()\n    if not IsValid(lp) then\n        refreshLocalPlayer()\n    end\n    return lp\nend\n\n-- hot path usage\nhook.Add(\"Think\", \"MyAddon_Think\", function()\n    local ply = getLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- fast path: use `ply` for the rest of this frame\n    -- ply:SetNWBool(...)\nend)\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only re-resolve when invalid instead of calling it repeatedly in hot loops.","model_patch":"```lua\n-- cache.lua\nlocal lp\n\nlocal function refreshLocalPlayer()\n    local p = LocalPlayer()\n    if IsValid(p) then\n        lp = p\n    end\nend\n\n-- one-time setup when client is ready\nhook.Add(\"InitPostEntity\", \"CacheLocalPlayer\", refreshLocalPlayer)\n\n-- safety: player can be nil briefly; repair lazily\nlocal function getLocalPlayer()\n    if not IsValid(lp) then\n        refreshLocalPlayer()\n    end\n    return lp\nend\n\n-- hot path usage\nhook.Add(\"Think\", \"MyAddon_Think\", function()\n    local ply = getLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- fast path: use `ply` for the rest of this frame\n    -- ply:SetNWBool(...)\nend)\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only re-resolve when invalid instead of calling it repeatedly in hot loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12884,"startedAt":"2026-07-11T07:38:37.565Z","completedAt":"2026-07-11T07:38:50.500Z","answerBytes":895,"answerChars":893,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11858,"completionTokens":947,"totalTokens":12805,"reasoningTokens":631,"cachedTokens":11520},"finalResponse":"```lua\nlocal function AreMutuallyLooking(p1, p2, cosHalfFov, maxDistSq)\n    local p1Pos = p1:EyePos()\n    local p2Pos = p2:EyePos()\n\n    local toP2 = p2Pos - p1Pos\n    local distSq = toP2:LengthSqr()\n    if distSq <= 0 or (maxDistSq and distSq > maxDistSq) then return false end\n\n    local dir = toP2:GetNormalized() -- direction from p1 to p2\n    local p1Dir = p1:GetAimVector()\n    local p2Dir = p2:GetAimVector()\n\n    return p1Dir:Dot(dir) >= cosHalfFov and p2Dir:Dot(-dir) >= cosHalfFov\nend\n\n-- Example: ~30° cone each (cos(15°)) and optional distance cap at 1500u\n-- local c = math.cos(math.rad(15))\n-- local closeSq = 1500^2\n-- if AreMutuallyLooking(plyA, plyB, c, closeSq) then ... end\n```\nReason: Use unit vectors and a single dot-product comparison (against a precomputed cosine threshold) so you avoid acos/angle math and extra trig work while still getting an O(1) mutual-aim check.","model_patch":"```lua\nlocal function AreMutuallyLooking(p1, p2, cosHalfFov, maxDistSq)\n    local p1Pos = p1:EyePos()\n    local p2Pos = p2:EyePos()\n\n    local toP2 = p2Pos - p1Pos\n    local distSq = toP2:LengthSqr()\n    if distSq <= 0 or (maxDistSq and distSq > maxDistSq) then return false end\n\n    local dir = toP2:GetNormalized() -- direction from p1 to p2\n    local p1Dir = p1:GetAimVector()\n    local p2Dir = p2:GetAimVector()\n\n    return p1Dir:Dot(dir) >= cosHalfFov and p2Dir:Dot(-dir) >= cosHalfFov\nend\n\n-- Example: ~30° cone each (cos(15°)) and optional distance cap at 1500u\n-- local c = math.cos(math.rad(15))\n-- local closeSq = 1500^2\n-- if AreMutuallyLooking(plyA, plyB, c, closeSq) then ... end\n```\nReason: Use unit vectors and a single dot-product comparison (against a precomputed cosine threshold) so you avoid acos/angle math and extra trig work while still getting an O(1) mutual-aim check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3840,"startedAt":"2026-07-11T07:38:37.974Z","completedAt":"2026-07-11T07:38:41.874Z","answerBytes":394,"answerChars":394,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11850,"completionTokens":528,"totalTokens":12378,"reasoningTokens":419,"cachedTokens":0},"finalResponse":"```lua\nlocal function SomeHelper(ply)\n    -- fast-path helper code\nend\n\nlocal result = SomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is usually marginally faster or equal for helper-owned functions because colon syntax is pure syntax sugar that also performs method lookup on `ply` (`ply:SomeHelper(...)`), so passing `ply` explicitly avoids extra dispatch overhead and is clearer in hot paths.","model_patch":"```lua\nlocal function SomeHelper(ply)\n    -- fast-path helper code\nend\n\nlocal result = SomeHelper(ply)\n```\nReason: `SomeHelper(ply)` is usually marginally faster or equal for helper-owned functions because colon syntax is pure syntax sugar that also performs method lookup on `ply` (`ply:SomeHelper(...)`), so passing `ply` explicitly avoids extra dispatch overhead and is clearer in hot paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11345,"startedAt":"2026-07-11T07:38:39.011Z","completedAt":"2026-07-11T07:38:50.364Z","answerBytes":221,"answerChars":221,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":419,"totalTokens":12264,"reasoningTokens":336,"cachedTokens":0},"finalResponse":"```lua\n-- Faster than print() in a hot path\nMsg(\"[DBG] value=\", value, \"\\n\")\n```\nReason: `Msg` writes directly to the console and avoids `print`'s multi-arg tostring/formatting and extra debug overhead in Garry's Mod Lua.","model_patch":"```lua\n-- Faster than print() in a hot path\nMsg(\"[DBG] value=\", value, \"\\n\")\n```\nReason: `Msg` writes directly to the console and avoids `print`'s multi-arg tostring/formatting and extra debug overhead in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11445,"startedAt":"2026-07-11T07:38:39.435Z","completedAt":"2026-07-11T07:38:50.883Z","answerBytes":345,"answerChars":345,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":487,"totalTokens":12338,"reasoningTokens":359,"cachedTokens":0},"finalResponse":"```lua\nlocal nums = {10, 20, 30, 40, 50}\nlocal total = 0\n\nlocal n = #nums -- cache once for the loop\nfor i = 1, n do\n    total = total + nums[i]\nend\n\nprint(total)\n```\nReason: For a dense 1..n array in Lua, numeric `for` with direct index access is the fastest and most predictable; `pairs` and `ipairs` add iterator overhead and slower dispatch.","model_patch":"```lua\nlocal nums = {10, 20, 30, 40, 50}\nlocal total = 0\n\nlocal n = #nums -- cache once for the loop\nfor i = 1, n do\n    total = total + nums[i]\nend\n\nprint(total)\n```\nReason: For a dense 1..n array in Lua, numeric `for` with direct index access is the fastest and most predictable; `pairs` and `ipairs` add iterator overhead and slower dispatch."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11536,"startedAt":"2026-07-11T07:38:42.086Z","completedAt":"2026-07-11T07:38:53.889Z","answerBytes":688,"answerChars":686,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11859,"completionTokens":918,"totalTokens":12777,"reasoningTokens":718,"cachedTokens":11520},"finalResponse":"```lua\nlocal function richAliveNicknames()\n    local result = {}\n    local n = 0\n\n    for i = 1, #player.GetAll() do\n        local ply = player.GetAll()[i]\n\n        if IsValid(ply) and ply:Alive() and ply.getDarkRPVar then\n            local wallet = ply:getDarkRPVar(\"money\")\n            if wallet and wallet >= 5000 then\n                n = n + 1\n                result[n] = ply:Nick()\n            end\n        end\n    end\n\n    return result\nend\n\nlocal rich = richAliveNicknames()\n-- use rich\n```\nReason: This fuses filter+map into one pass with a plain numeric loop, avoiding DarkRP fn’s iterator/closure overhead and avoiding extra intermediate tables from separate filter/map stages.","model_patch":"```lua\nlocal function richAliveNicknames()\n    local result = {}\n    local n = 0\n\n    for i = 1, #player.GetAll() do\n        local ply = player.GetAll()[i]\n\n        if IsValid(ply) and ply:Alive() and ply.getDarkRPVar then\n            local wallet = ply:getDarkRPVar(\"money\")\n            if wallet and wallet >= 5000 then\n                n = n + 1\n                result[n] = ply:Nick()\n            end\n        end\n    end\n\n    return result\nend\n\nlocal rich = richAliveNicknames()\n-- use rich\n```\nReason: This fuses filter+map into one pass with a plain numeric loop, avoiding DarkRP fn’s iterator/closure overhead and avoiding extra intermediate tables from separate filter/map stages."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7487,"startedAt":"2026-07-11T07:38:42.829Z","completedAt":"2026-07-11T07:38:50.475Z","answerBytes":1346,"answerChars":1346,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11858,"completionTokens":1814,"totalTokens":13672,"reasoningTokens":1422,"cachedTokens":11520},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nlocal function rebuildCache()\n    table.Empty(cachedPlayers)\n    table.Empty(playerIndex)\n\n    local all = player.GetAll()\n    for i = 1, #all do\n        local ply = all[i]\n        cachedPlayers[i] = ply\n        playerIndex[ply] = i\n    end\nend\n\nlocal function addPlayer(ply)\n    if playerIndex[ply] or not IsValid(ply) then return end\n\n    local idx = #cachedPlayers + 1\n    cachedPlayers[idx] = ply\n    playerIndex[ply] = idx\nend\n\nlocal function removePlayer(ply)\n    local idx = playerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #cachedPlayers\n    local lastPly = cachedPlayers[lastIdx]\n\n    cachedPlayers[idx] = lastPly\n    playerIndex[lastPly] = idx\n\n    cachedPlayers[lastIdx] = nil\n    playerIndex[ply] = nil\nend\n\nhook.Add(\"Initialize\", \"PlayerCache_Init\", rebuildCache)\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", addPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", removePlayer)\n\nhook.Add(\"Think\", \"MyFastThink\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- per-tick logic here\n    end\nend)\n```\nReason: This removes `player.GetAll()` from the tick path and keeps a live cache updated only on join/leave hooks, so each tick iterates a maintained array instead of rebuilding player lists repeatedly.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal playerIndex = {}\n\nlocal function rebuildCache()\n    table.Empty(cachedPlayers)\n    table.Empty(playerIndex)\n\n    local all = player.GetAll()\n    for i = 1, #all do\n        local ply = all[i]\n        cachedPlayers[i] = ply\n        playerIndex[ply] = i\n    end\nend\n\nlocal function addPlayer(ply)\n    if playerIndex[ply] or not IsValid(ply) then return end\n\n    local idx = #cachedPlayers + 1\n    cachedPlayers[idx] = ply\n    playerIndex[ply] = idx\nend\n\nlocal function removePlayer(ply)\n    local idx = playerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #cachedPlayers\n    local lastPly = cachedPlayers[lastIdx]\n\n    cachedPlayers[idx] = lastPly\n    playerIndex[lastPly] = idx\n\n    cachedPlayers[lastIdx] = nil\n    playerIndex[ply] = nil\nend\n\nhook.Add(\"Initialize\", \"PlayerCache_Init\", rebuildCache)\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", addPlayer)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", removePlayer)\n\nhook.Add(\"Think\", \"MyFastThink\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- per-tick logic here\n    end\nend)\n```\nReason: This removes `player.GetAll()` from the tick path and keeps a live cache updated only on join/leave hooks, so each tick iterates a maintained array instead of rebuilding player lists repeatedly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":13020,"startedAt":"2026-07-11T07:38:42.987Z","completedAt":"2026-07-11T07:38:56.075Z","answerBytes":794,"answerChars":794,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":1110,"totalTokens":12957,"reasoningTokens":841,"cachedTokens":11520},"finalResponse":"```lua\nlocal plyCache = {}\n\nlocal function dataOf(ply)\n    if not IsValid(ply) then return nil end\n    local k = ply:EntIndex()\n    local d = plyCache[k]\n    if d then return d end\n\n    d = {\n        bullets = 0,\n        lastShot = 0,\n    }\n    plyCache[k] = d\n    return d\nend\n\nfunction AddPlayerBullets(ply, n)\n    local d = dataOf(ply)\n    if d then\n        d.bullets = d.bullets + n\n    end\nend\n\nfunction GetPlayerBullets(ply)\n    local d = dataOf(ply)\n    return d and d.bullets or 0\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearPlyTempCache\", function(ply)\n    plyCache[ply:EntIndex()] = nil\nend)\n```\nReason: Plain Lua arrays by `ply:EntIndex()` are faster for hot reads than `ply.someField` because they bypass player userdata/metatable lookup and keep temp data in a dedicated cache table.","model_patch":"```lua\nlocal plyCache = {}\n\nlocal function dataOf(ply)\n    if not IsValid(ply) then return nil end\n    local k = ply:EntIndex()\n    local d = plyCache[k]\n    if d then return d end\n\n    d = {\n        bullets = 0,\n        lastShot = 0,\n    }\n    plyCache[k] = d\n    return d\nend\n\nfunction AddPlayerBullets(ply, n)\n    local d = dataOf(ply)\n    if d then\n        d.bullets = d.bullets + n\n    end\nend\n\nfunction GetPlayerBullets(ply)\n    local d = dataOf(ply)\n    return d and d.bullets or 0\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearPlyTempCache\", function(ply)\n    plyCache[ply:EntIndex()] = nil\nend)\n```\nReason: Plain Lua arrays by `ply:EntIndex()` are faster for hot reads than `ply.someField` because they bypass player userdata/metatable lookup and keep temp data in a dedicated cache table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":11166,"startedAt":"2026-07-11T07:38:44.363Z","completedAt":"2026-07-11T07:38:55.841Z","answerBytes":1139,"answerChars":1139,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":1001,"totalTokens":12849,"reasoningTokens":591,"cachedTokens":11520},"finalResponse":"```lua\n-- Prefer this for fixed collections: dense array (integer keys)\nlocal fixed = {\n    10,\n    20,\n    30,\n    40,\n    50,\n}\n\n-- Slowest-for-comparison shape: string-keyed map\nlocal fixed_map = {\n    a = 10,\n    b = 20,\n    c = 30,\n    d = 40,\n    e = 50,\n}\n\nlocal function sum_array(t)\n    local total = 0\n    for i = 1, #t do\n        total = total + t[i]\n    end\n    return total\nend\n\nlocal function sum_map(t)\n    local total = 0\n    for _, v in pairs(t) do\n        total = total + v\n    end\n    return total\nend\n\nlocal function bench()\n    local runs = 200000\n    local a, b = 0, 0\n    local start\n\n    start = SysTime()\n    for i = 1, runs do\n        a = a + sum_array(fixed)\n    end\n    print(\"array\", SysTime() - start)\n\n    start = SysTime()\n    for i = 1, runs do\n        b = b + sum_map(fixed_map)\n    end\n    print(\"map\", SysTime() - start)\n\n    print(\"sink\", a + b)\nend\n\nbench()\n```\nReason: Use a dense numeric-indexed array (`{1,2,3...}`) and iterate with `for i=1,#t` when the set of keys is fixed, because Garry's Mod/Lua tables keep numeric sequences contiguous and `pairs` on string-key maps is hash-based and slower.","model_patch":"```lua\n-- Prefer this for fixed collections: dense array (integer keys)\nlocal fixed = {\n    10,\n    20,\n    30,\n    40,\n    50,\n}\n\n-- Slowest-for-comparison shape: string-keyed map\nlocal fixed_map = {\n    a = 10,\n    b = 20,\n    c = 30,\n    d = 40,\n    e = 50,\n}\n\nlocal function sum_array(t)\n    local total = 0\n    for i = 1, #t do\n        total = total + t[i]\n    end\n    return total\nend\n\nlocal function sum_map(t)\n    local total = 0\n    for _, v in pairs(t) do\n        total = total + v\n    end\n    return total\nend\n\nlocal function bench()\n    local runs = 200000\n    local a, b = 0, 0\n    local start\n\n    start = SysTime()\n    for i = 1, runs do\n        a = a + sum_array(fixed)\n    end\n    print(\"array\", SysTime() - start)\n\n    start = SysTime()\n    for i = 1, runs do\n        b = b + sum_map(fixed_map)\n    end\n    print(\"map\", SysTime() - start)\n\n    print(\"sink\", a + b)\nend\n\nbench()\n```\nReason: Use a dense numeric-indexed array (`{1,2,3...}`) and iterate with `for i=1,#t` when the set of keys is fixed, because Garry's Mod/Lua tables keep numeric sequences contiguous and `pairs` on string-key maps is hash-based and slower."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11955,"startedAt":"2026-07-11T07:38:44.488Z","completedAt":"2026-07-11T07:38:56.699Z","answerBytes":377,"answerChars":377,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":557,"totalTokens":12404,"reasoningTokens":416,"cachedTokens":0},"finalResponse":"```lua\nlocal r, g, b, a = 255, 64, 0, 200\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    -- hot path: pass numbers directly\n    surface.SetDrawColor(r, g, b, a)\n    surface.DrawRect(16, 16, 128, 32)\nend)\n```\nReason: Passing `r,g,b,a` directly avoids creating/allocating a `Color` table and avoids per-call field lookups, so it is the lower-overhead form for tight draw loops.","model_patch":"```lua\nlocal r, g, b, a = 255, 64, 0, 200\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    -- hot path: pass numbers directly\n    surface.SetDrawColor(r, g, b, a)\n    surface.DrawRect(16, 16, 128, 32)\nend)\n```\nReason: Passing `r,g,b,a` directly avoids creating/allocating a `Color` table and avoids per-call field lookups, so it is the lower-overhead form for tight draw loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11827,"startedAt":"2026-07-11T07:38:44.646Z","completedAt":"2026-07-11T07:38:56.761Z","answerBytes":404,"answerChars":404,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11869,"completionTokens":576,"totalTokens":12445,"reasoningTokens":449,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamID = \"STEAM_0:1:12345678\"\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\nif row then\n    print(row.coins)\nend\n```\nReason: Local SQLite (`sql` library) is typically lower latency on a single Garry's Mod server because it is in-process with no network round-trips, so read/write calls are usually faster than remote MySQL for this setup.","model_patch":"```lua\nlocal steamID = \"STEAM_0:1:12345678\"\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\nif row then\n    print(row.coins)\nend\n```\nReason: Local SQLite (`sql` library) is typically lower latency on a single Garry's Mod server because it is in-process with no network round-trips, so read/write calls are usually faster than remote MySQL for this setup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11326,"startedAt":"2026-07-11T07:38:44.672Z","completedAt":"2026-07-11T07:38:56.191Z","answerBytes":888,"answerChars":888,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11840,"completionTokens":551,"totalTokens":12391,"reasoningTokens":279,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" }) -- weak-keys: auto cleanup when players GC\n\nlocal function cacheSteamID(ply)\n    local cached = steamIDCache[ply]\n    if cached then return cached end\n\n    local sid = ply:SteamID()\n    steamIDCache[ply] = sid\n    return sid\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheSteamID_OnSpawn\", function(ply)\n    steamIDCache[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CacheSteamID_OnDisconnect\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- hot path: use cacheSteamID(ply) instead of ply:SteamID()\nlocal function OnHotPathTick(ply)\n    local sid = cacheSteamID(ply)\n    -- use sid repeatedly here\n    return sid\nend\n```\nReason: Cache the SteamID once per player and reuse it on hot-path calls, clearing the entry on disconnect (and using weak keys for safety) to avoid repeated expensive `ply:SteamID()` lookups.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" }) -- weak-keys: auto cleanup when players GC\n\nlocal function cacheSteamID(ply)\n    local cached = steamIDCache[ply]\n    if cached then return cached end\n\n    local sid = ply:SteamID()\n    steamIDCache[ply] = sid\n    return sid\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CacheSteamID_OnSpawn\", function(ply)\n    steamIDCache[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CacheSteamID_OnDisconnect\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- hot path: use cacheSteamID(ply) instead of ply:SteamID()\nlocal function OnHotPathTick(ply)\n    local sid = cacheSteamID(ply)\n    -- use sid repeatedly here\n    return sid\nend\n```\nReason: Cache the SteamID once per player and reuse it on hot-path calls, clearing the entry on disconnect (and using weak keys for safety) to avoid repeated expensive `ply:SteamID()` lookups."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12547,"startedAt":"2026-07-11T07:38:44.821Z","completedAt":"2026-07-11T07:38:57.707Z","answerBytes":773,"answerChars":773,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":579,"totalTokens":12422,"reasoningTokens":334,"cachedTokens":11520},"finalResponse":"```lua\n-- Fast path\nlocal function buildMessageFast(count)\n    local parts = {}\n    parts[#parts + 1] = \"start\"\n\n    for i = 1, count do\n        parts[#parts + 1] = tostring(i)\n        parts[#parts + 1] = \"-\"\n        parts[#parts + 1] = \"item,\"\n    end\n\n    parts[#parts + 1] = \"end\"\n    return table.concat(parts) -- one allocation pass\nend\n\n-- Slow path (avoid)\n-- local s = \"\"\n-- for i = 1, count do\n--     s = s .. tostring(i) .. \"-item,\" -- repeated allocations\n-- end\n\nlocal big = buildMessageFast(50000)\nprint(big)\n```\nReason: In Lua, concatenating many small strings with `..` inside a loop repeatedly reallocates/copies the growing string, while collecting chunks in a table and calling `table.concat` once performs linear-time assembly with far fewer allocations.","model_patch":"```lua\n-- Fast path\nlocal function buildMessageFast(count)\n    local parts = {}\n    parts[#parts + 1] = \"start\"\n\n    for i = 1, count do\n        parts[#parts + 1] = tostring(i)\n        parts[#parts + 1] = \"-\"\n        parts[#parts + 1] = \"item,\"\n    end\n\n    parts[#parts + 1] = \"end\"\n    return table.concat(parts) -- one allocation pass\nend\n\n-- Slow path (avoid)\n-- local s = \"\"\n-- for i = 1, count do\n--     s = s .. tostring(i) .. \"-item,\" -- repeated allocations\n-- end\n\nlocal big = buildMessageFast(50000)\nprint(big)\n```\nReason: In Lua, concatenating many small strings with `..` inside a loop repeatedly reallocates/copies the growing string, while collecting chunks in a table and calling `table.concat` once performs linear-time assembly with far fewer allocations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":6021,"startedAt":"2026-07-11T07:38:44.834Z","completedAt":"2026-07-11T07:38:51.283Z","answerBytes":543,"answerChars":543,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":447,"totalTokens":12292,"reasoningTokens":269,"cachedTokens":11520},"finalResponse":"```lua\n-- faster for non-rounded quads than draw.RoundedBox(0,...)\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nlocal function DrawManyRects(rects)\n    for i = 1, #rects do\n        local rc = rects[i]\n        SetDrawColor(rc.r or 255, rc.g or 255, rc.b or 255, rc.a or 255)\n        DrawRect(rc.x, rc.y, rc.w, rc.h)\n    end\nend\n``` \nReason: `draw.RoundedBox(0, ...)` still goes through rounded-box logic, while `surface.DrawRect` is the direct primitive path for solid rectangles and skips corner/shape overhead.","model_patch":"```lua\n-- faster for non-rounded quads than draw.RoundedBox(0,...)\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nlocal function DrawManyRects(rects)\n    for i = 1, #rects do\n        local rc = rects[i]\n        SetDrawColor(rc.r or 255, rc.g or 255, rc.b or 255, rc.a or 255)\n        DrawRect(rc.x, rc.y, rc.w, rc.h)\n    end\nend\n``` \nReason: `draw.RoundedBox(0, ...)` still goes through rounded-box logic, while `surface.DrawRect` is the direct primitive path for solid rectangles and skips corner/shape overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12824,"startedAt":"2026-07-11T07:38:45.118Z","completedAt":"2026-07-11T07:38:58.396Z","answerBytes":676,"answerChars":676,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":1283,"totalTokens":13127,"reasoningTokens":1057,"cachedTokens":11520},"finalResponse":"```lua\nlocal FONT = \"DermaLarge\"\nlocal TEXT_COLOR = Color(255, 255, 255, 255)\n\nsurface.CreateFont(FONT, {\n    font = \"Arial\",\n    size = 22,\n    weight = 600,\n    antialias = true,\n    additive = false,\n})\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    local txt = \"Health: \" .. LocalPlayer():Health()\n\n    surface.SetFont(FONT)\n    surface.SetTextColor(TEXT_COLOR)\n    surface.SetTextPos(16, 16)\n    surface.DrawText(txt)\nend)\n```\nReason: Use the low-level `surface.SetFont`, `SetTextColor`, `SetTextPos`, `DrawText` path to avoid the extra wrapping logic in `draw.DrawText`/`SimpleTextOutlined` (alignment, optional shadows/flags) for per-frame single-line text.","model_patch":"```lua\nlocal FONT = \"DermaLarge\"\nlocal TEXT_COLOR = Color(255, 255, 255, 255)\n\nsurface.CreateFont(FONT, {\n    font = \"Arial\",\n    size = 22,\n    weight = 600,\n    antialias = true,\n    additive = false,\n})\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    local txt = \"Health: \" .. LocalPlayer():Health()\n\n    surface.SetFont(FONT)\n    surface.SetTextColor(TEXT_COLOR)\n    surface.SetTextPos(16, 16)\n    surface.DrawText(txt)\nend)\n```\nReason: Use the low-level `surface.SetFont`, `SetTextColor`, `SetTextPos`, `DrawText` path to avoid the extra wrapping logic in `draw.DrawText`/`SimpleTextOutlined` (alignment, optional shadows/flags) for per-frame single-line text."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13265,"startedAt":"2026-07-11T07:38:45.137Z","completedAt":"2026-07-11T07:38:58.909Z","answerBytes":292,"answerChars":292,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":142,"totalTokens":11980,"reasoningTokens":61,"cachedTokens":11520},"finalResponse":"```lua\n-- Preferred for sequential array-like tables\nlocal n = #tbl\n```\nReason: Garry's Mod Lua follows standard Lua for array-like tables, and `#` returns the sequence length (highest contiguous integer index from 1), which is the correct and fastest operator for ordered array-style tables.","model_patch":"```lua\n-- Preferred for sequential array-like tables\nlocal n = #tbl\n```\nReason: Garry's Mod Lua follows standard Lua for array-like tables, and `#` returns the sequence length (highest contiguous integer index from 1), which is the correct and fastest operator for ordered array-style tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11799,"startedAt":"2026-07-11T07:38:45.261Z","completedAt":"2026-07-11T07:38:57.706Z","answerBytes":426,"answerChars":426,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":537,"totalTokens":12380,"reasoningTokens":424,"cachedTokens":11520},"finalResponse":"```lua\n-- Fastest way to discard and reuse a large sequential table when variable can be rebound.\n-- Rebind the local/table variable to a brand new table.\narr = {}\n```\nReason: Rebinding with `arr = {}` is O(1), while `table.Empty(arr)` still has to traverse and clear each element, so for repeated high-frequency resets the assignment is generally faster and cheaper unless you must preserve all existing references to `arr`. ","model_patch":"```lua\n-- Fastest way to discard and reuse a large sequential table when variable can be rebound.\n-- Rebind the local/table variable to a brand new table.\narr = {}\n```\nReason: Rebinding with `arr = {}` is O(1), while `table.Empty(arr)` still has to traverse and clear each element, so for repeated high-frequency resets the assignment is generally faster and cheaper unless you must preserve all existing references to `arr`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12677,"startedAt":"2026-07-11T07:38:45.831Z","completedAt":"2026-07-11T07:38:58.592Z","answerBytes":504,"answerChars":502,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":458,"totalTokens":12303,"reasoningTokens":288,"cachedTokens":11520},"finalResponse":"```lua\n-- Build as a set (map) once, not a list.\nlocal validCommands = {\n    [\"give\"] = true,\n    [\"take\"] = true,\n    [\"reload\"] = true,\n    [\"jump\"] = true,\n}\n\nlocal function hasCommand(cmd)\n    return validCommands[cmd] == true\nend\n\n-- Faster than table.HasValue(\"command\", list), which scans every element.\nif hasCommand(\"reload\") then\n    print(\"command exists\")\nend\n``` \nReason: table lookups by key are O(1) in Lua, so a set-table is much faster than table.HasValue’s linear scan through a list.","model_patch":"```lua\n-- Build as a set (map) once, not a list.\nlocal validCommands = {\n    [\"give\"] = true,\n    [\"take\"] = true,\n    [\"reload\"] = true,\n    [\"jump\"] = true,\n}\n\nlocal function hasCommand(cmd)\n    return validCommands[cmd] == true\nend\n\n-- Faster than table.HasValue(\"command\", list), which scans every element.\nif hasCommand(\"reload\") then\n    print(\"command exists\")\nend\n``` \nReason: table lookups by key are O(1) in Lua, so a set-table is much faster than table.HasValue’s linear scan through a list."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12185,"startedAt":"2026-07-11T07:38:45.861Z","completedAt":"2026-07-11T07:38:58.142Z","answerBytes":330,"answerChars":330,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":465,"totalTokens":12311,"reasoningTokens":351,"cachedTokens":11520},"finalResponse":"```lua\nlocal t = {\n    pos = Vector(0, 0, 0),\n    hp = 100,\n    name = \"player_1\",\n    alive = true,\n}\n```\nReason: In Garry's Mod Lua (Lua 5.1), constructing with a literal is faster because the table is created and populated in one operation, while `{}` plus later assignments does extra assignment work on an extra object state.","model_patch":"```lua\nlocal t = {\n    pos = Vector(0, 0, 0),\n    hp = 100,\n    name = \"player_1\",\n    alive = true,\n}\n```\nReason: In Garry's Mod Lua (Lua 5.1), constructing with a literal is faster because the table is created and populated in one operation, while `{}` plus later assignments does extra assignment work on an extra object state."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11270,"startedAt":"2026-07-11T07:38:45.904Z","completedAt":"2026-07-11T07:38:57.233Z","answerBytes":330,"answerChars":330,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11836,"completionTokens":310,"totalTokens":12146,"reasoningTokens":202,"cachedTokens":11520},"finalResponse":"```lua\nlocal function randomFromSequential(t)\n    local n = #t\n    if n == 0 then return nil end\n    return t[math.random(1, n)]\nend\n```\nReason: `table.Random` handles non-sequential keys and mixed tables, so direct indexed lookup via `#t` and `math.random(1, n)` avoids those extra checks and hash overhead for array-like tables.","model_patch":"```lua\nlocal function randomFromSequential(t)\n    local n = #t\n    if n == 0 then return nil end\n    return t[math.random(1, n)]\nend\n```\nReason: `table.Random` handles non-sequential keys and mixed tables, so direct indexed lookup via `#t` and `math.random(1, n)` avoids those extra checks and hash overhead for array-like tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12018,"startedAt":"2026-07-11T07:38:45.915Z","completedAt":"2026-07-11T07:38:58.144Z","answerBytes":254,"answerChars":254,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11837,"completionTokens":316,"totalTokens":12153,"reasoningTokens":219,"cachedTokens":11520},"finalResponse":"```lua\nfor i = 1, n do\n    local x = values[i]\n    out[i] = x * x\nend\n```\nReason: Use `x * x`; it is the fastest form in Lua/Garry's Mod because it is a direct arithmetic operation, while `math.pow(x, 2)` or bit tricks add extra overhead in a tight loop.","model_patch":"```lua\nfor i = 1, n do\n    local x = values[i]\n    out[i] = x * x\nend\n```\nReason: Use `x * x`; it is the fastest form in Lua/Garry's Mod because it is a direct arithmetic operation, while `math.pow(x, 2)` or bit tricks add extra overhead in a tight loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.3-codex-spark@low","model_name_or_path":"gpt-5.3-codex-spark@low","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":12674,"startedAt":"2026-07-11T07:38:46.025Z","completedAt":"2026-07-11T07:38:58.910Z","answerBytes":223,"answerChars":223,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11853,"completionTokens":389,"totalTokens":12242,"reasoningTokens":314,"cachedTokens":11520},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- process each connected player\n    print(ply:Nick())\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and `ipairs` iterates every player entry.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- process each connected player\n    print(ply:Nick())\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and `ipairs` iterates every player entry."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13722,"startedAt":"2026-07-11T07:38:46.558Z","completedAt":"2026-07-11T07:39:00.488Z","answerBytes":309,"answerChars":309,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":2236,"totalTokens":14078,"reasoningTokens":2133,"cachedTokens":11520},"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if not IsValid(ent) then\n        continue\n    end\n\n    -- process ent\nend\n```\nReason: `ents.FindByClass(\"prop_physics\")` asks the engine for only `prop_physics` entities, so the loop never builds an upfront table of all entities in the map.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if not IsValid(ent) then\n        continue\n    end\n\n    -- process ent\nend\n```\nReason: `ents.FindByClass(\"prop_physics\")` asks the engine for only `prop_physics` entities, so the loop never builds an upfront table of all entities in the map."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4677,"startedAt":"2026-07-11T07:38:46.601Z","completedAt":"2026-07-11T07:38:51.452Z","answerBytes":222,"answerChars":222,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":263,"totalTokens":12111,"reasoningTokens":188,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- your Think logic here\nend)\n```\nReason: `hook.Add` registers a Think hook callback under the unique identifier `MyAddon.Think` so the function is called each tick.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- your Think logic here\nend)\n```\nReason: `hook.Add` registers a Think hook callback under the unique identifier `MyAddon.Think` so the function is called each tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":13150,"startedAt":"2026-07-11T07:38:46.683Z","completedAt":"2026-07-11T07:38:59.968Z","answerBytes":228,"answerChars":228,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":440,"totalTokens":12281,"reasoningTokens":363,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` is the Garry's Mod Lua validity check that safely handles `nil` and removed entities, so calls inside the block won't run on dead/deleted entities.","model_patch":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` is the Garry's Mod Lua validity check that safely handles `nil` and removed entities, so calls inside the block won't run on dead/deleted entities."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8567,"startedAt":"2026-07-11T07:38:47.804Z","completedAt":"2026-07-11T07:38:56.389Z","answerBytes":419,"answerChars":419,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11836,"completionTokens":782,"totalTokens":12618,"reasoningTokens":659,"cachedTokens":11520},"finalResponse":"```lua\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\nend\n\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handler runs when MyAddon.Sync arrives\n    local payload = net.ReadString()\n    print(\"Received:\", payload)\nend)\n```\nReason: `net.Receive` is GMod's inbound network callback registration for a message name, and `util.AddNetworkString` exposes that message from client->server when used on server.","model_patch":"```lua\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\nend\n\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handler runs when MyAddon.Sync arrives\n    local payload = net.ReadString()\n    print(\"Received:\", payload)\nend)\n```\nReason: `net.Receive` is GMod's inbound network callback registration for a message name, and `util.AddNetworkString` exposes that message from client->server when used on server."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":10165,"startedAt":"2026-07-11T07:38:50.456Z","completedAt":"2026-07-11T07:39:00.675Z","answerBytes":576,"answerChars":576,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":2944,"totalTokens":14788,"reasoningTokens":2748,"cachedTokens":11520},"finalResponse":"```lua\n-- Pre-allocate once, reset in-place in the hot loop.\n-- No Angle() call per iteration.\nlocal anglePool = { Angle(), Angle(), Angle() }\nlocal poolI = 0\n\nlocal function GetZeroAngle()\n    poolI = (poolI % #anglePool) + 1\n    local a = anglePool[poolI]\n    a.p, a.y, a.r = 0, 0, 0\n    return a\nend\n\nfor i = 1, 1000000 do\n    local ang = GetZeroAngle()\n    -- use ang\nend\n```\nReason: Reusing/resetting preallocated Angle objects avoids per-iteration userdata allocation and GC pressure from `Angle()` in the hot path; use a small pool only if re-entrant calls can overlap.","model_patch":"```lua\n-- Pre-allocate once, reset in-place in the hot loop.\n-- No Angle() call per iteration.\nlocal anglePool = { Angle(), Angle(), Angle() }\nlocal poolI = 0\n\nlocal function GetZeroAngle()\n    poolI = (poolI % #anglePool) + 1\n    local a = anglePool[poolI]\n    a.p, a.y, a.r = 0, 0, 0\n    return a\nend\n\nfor i = 1, 1000000 do\n    local ang = GetZeroAngle()\n    -- use ang\nend\n```\nReason: Reusing/resetting preallocated Angle objects avoids per-iteration userdata allocation and GC pressure from `Angle()` in the hot path; use a small pool only if re-entrant calls can overlap."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5623,"startedAt":"2026-07-11T07:38:50.506Z","completedAt":"2026-07-11T07:38:56.763Z","answerBytes":284,"answerChars":284,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":784,"totalTokens":12631,"reasoningTokens":694,"cachedTokens":11520},"finalResponse":"```lua\nlocal addonColor = myaddon.config.color\n\nlocal function shouldUseColor()\n    local c = addonColor\n    return c\nend\n```\nReason: Cache the setting in a local, because local lookup is cheaper than global/table chain lookups (`myaddon` + `config` + `color`) on every hot-path read.","model_patch":"```lua\nlocal addonColor = myaddon.config.color\n\nlocal function shouldUseColor()\n    local c = addonColor\n    return c\nend\n```\nReason: Cache the setting in a local, because local lookup is cheaper than global/table chain lookups (`myaddon` + `config` + `color`) on every hot-path read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6463,"startedAt":"2026-07-11T07:38:50.879Z","completedAt":"2026-07-11T07:38:57.750Z","answerBytes":326,"answerChars":322,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":1275,"totalTokens":13116,"reasoningTokens":1167,"cachedTokens":11520},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred DarkRP API (instead of ply:GetNWString(\"job\"))\n```\nReason: Use `getDarkRPVar(\"job\")` because it is DarkRP’s versioned, replicated player job accessor, while raw `GetNWString(\"job\")` is low-level NW access and can drift from DarkRP’s intended `DarkRPVar` updates.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\") -- preferred DarkRP API (instead of ply:GetNWString(\"job\"))\n```\nReason: Use `getDarkRPVar(\"job\")` because it is DarkRP’s versioned, replicated player job accessor, while raw `GetNWString(\"job\")` is low-level NW access and can drift from DarkRP’s intended `DarkRPVar` updates."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4483,"startedAt":"2026-07-11T07:38:51.132Z","completedAt":"2026-07-11T07:38:55.991Z","answerBytes":327,"answerChars":327,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":494,"totalTokens":12336,"reasoningTokens":364,"cachedTokens":0},"finalResponse":"```lua\nlocal p1 = Vector(0, 0, 0)\nlocal p2 = Vector(10, 0, 0)\nlocal maxDistance = 15\n\nif p1:DistToSqr(p2) <= maxDistance * maxDistance then\n    -- p1 is within 15 units of p2\nend\n```\nReason: Use `DistToSqr` and compare to `maxDistance^2` to avoid the expensive square-root from `Distance` when only a threshold check is needed.","model_patch":"```lua\nlocal p1 = Vector(0, 0, 0)\nlocal p2 = Vector(10, 0, 0)\nlocal maxDistance = 15\n\nif p1:DistToSqr(p2) <= maxDistance * maxDistance then\n    -- p1 is within 15 units of p2\nend\n```\nReason: Use `DistToSqr` and compare to `maxDistance^2` to avoid the expensive square-root from `Distance` when only a threshold check is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":7076,"startedAt":"2026-07-11T07:38:51.476Z","completedAt":"2026-07-11T07:38:58.592Z","answerBytes":441,"answerChars":441,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":1618,"totalTokens":13456,"reasoningTokens":1497,"cachedTokens":0},"finalResponse":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- visit entity\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- visit entity\n    end\nend\n```\nReason: Use `ents.Iterator()` first because it is the wiki-recommended efficient entity iterator that avoids allocating the full entities table; fall back to `ents.GetAll()` only when that iterator is unavailable.","model_patch":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- visit entity\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        -- visit entity\n    end\nend\n```\nReason: Use `ents.Iterator()` first because it is the wiki-recommended efficient entity iterator that avoids allocating the full entities table; fall back to `ents.GetAll()` only when that iterator is unavailable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":5576,"startedAt":"2026-07-11T07:38:51.508Z","completedAt":"2026-07-11T07:38:57.232Z","answerBytes":755,"answerChars":755,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11859,"completionTokens":1829,"totalTokens":13688,"reasoningTokens":1595,"cachedTokens":0},"finalResponse":"```lua\nlocal function FindNearbyEntitiesCheap(ply, radius)\n    if not IsValid(ply) then return {} end\n\n    local pos = ply:GetPos()\n    local range = Vector(radius, radius, radius)\n    local candidates = ents.FindInBox(pos - range, pos + range)\n\n    local out, n = {}, 0\n    local r2 = radius * radius\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and ent:GetPos():DistToSqr(pos) <= r2 then\n            n = n + 1\n            out[n] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: Use `ents.FindInBox` as a cheap broad-phase spatial query and post-filter by `DistToSqr` for true sphere distance, which is a common faster FindIn* alternative to `FindInPVS` in server-side proximity checks.","model_patch":"```lua\nlocal function FindNearbyEntitiesCheap(ply, radius)\n    if not IsValid(ply) then return {} end\n\n    local pos = ply:GetPos()\n    local range = Vector(radius, radius, radius)\n    local candidates = ents.FindInBox(pos - range, pos + range)\n\n    local out, n = {}, 0\n    local r2 = radius * radius\n\n    for i = 1, #candidates do\n        local ent = candidates[i]\n        if ent ~= ply and IsValid(ent) and ent:GetPos():DistToSqr(pos) <= r2 then\n            n = n + 1\n            out[n] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: Use `ents.FindInBox` as a cheap broad-phase spatial query and post-filter by `DistToSqr` for true sphere distance, which is a common faster FindIn* alternative to `FindInPVS` in server-side proximity checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3864,"startedAt":"2026-07-11T07:38:53.928Z","completedAt":"2026-07-11T07:38:57.897Z","answerBytes":551,"answerChars":551,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":1428,"totalTokens":13279,"reasoningTokens":1257,"cachedTokens":11520},"finalResponse":"```lua\nlocal function getPlayersInRadius(center, radius)\n    local rsq = radius * radius\n    local out = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:Alive() and ply:GetPos():DistToSqr(center) <= rsq then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n\n-- Example\nlocal players = getPlayersInRadius(Vector(0, 0, 0), 512)\n```\nReason: Iterate connected players directly and use `DistToSqr` so the query stays O(players) and avoids allocating/scanning every nearby entity that `ents.FindInSphere` would return.","model_patch":"```lua\nlocal function getPlayersInRadius(center, radius)\n    local rsq = radius * radius\n    local out = {}\n\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:Alive() and ply:GetPos():DistToSqr(center) <= rsq then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n\n-- Example\nlocal players = getPlayersInRadius(Vector(0, 0, 0), 512)\n```\nReason: Iterate connected players directly and use `DistToSqr` so the query stays O(players) and avoids allocating/scanning every nearby entity that `ents.FindInSphere` would return."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4300,"startedAt":"2026-07-11T07:38:55.843Z","completedAt":"2026-07-11T07:39:00.145Z","answerBytes":284,"answerChars":284,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":725,"totalTokens":12571,"reasoningTokens":620,"cachedTokens":6144},"finalResponse":"```lua\nlocal n = 1000000\nlocal total = 0\n\nfor i = 1, n do\n    total = total + 1\nend\n```\nReason: `for i = 1, n do` is usually faster in Garry's Mod Lua because the numeric `for` uses optimized loop bytecode, while a `while` loop does extra manual increment/compare work each iteration.","model_patch":"```lua\nlocal n = 1000000\nlocal total = 0\n\nfor i = 1, n do\n    total = total + 1\nend\n```\nReason: `for i = 1, n do` is usually faster in Garry's Mod Lua because the numeric `for` uses optimized loop bytecode, while a `while` loop does extra manual increment/compare work each iteration."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5470,"startedAt":"2026-07-11T07:38:56.002Z","completedAt":"2026-07-11T07:39:01.477Z","answerBytes":841,"answerChars":841,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11856,"completionTokens":1293,"totalTokens":13149,"reasoningTokens":1046,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, pass all players\nlocal TICK_HOOK = \"MyTickAllPlayers\"\n\nhook.Add(\"Think\", \"DispatchPlayerTick\", function()\n    local players = player.GetAll()   -- one table capture\n    hook.Run(TICK_HOOK, players, CurTime(), FrameTime())\nend)\n\nhook.Add(TICK_HOOK, \"HandlePlayerTick\", function(players, now, ft)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom per-player logic here\n        end\n    end\nend)\n\n-- Slower pattern to avoid:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"HandleSinglePlayerTick\", ply, CurTime(), FrameTime())\n-- end\n```\nReason: Dispatching one `hook.Run` per tick is faster because hook dispatch, lookup, and call setup happen once instead of once per player, with only one controlled loop for your own logic.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, pass all players\nlocal TICK_HOOK = \"MyTickAllPlayers\"\n\nhook.Add(\"Think\", \"DispatchPlayerTick\", function()\n    local players = player.GetAll()   -- one table capture\n    hook.Run(TICK_HOOK, players, CurTime(), FrameTime())\nend)\n\nhook.Add(TICK_HOOK, \"HandlePlayerTick\", function(players, now, ft)\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom per-player logic here\n        end\n    end\nend)\n\n-- Slower pattern to avoid:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"HandleSinglePlayerTick\", ply, CurTime(), FrameTime())\n-- end\n```\nReason: Dispatching one `hook.Run` per tick is faster because hook dispatch, lookup, and call setup happen once instead of once per player, with only one controlled loop for your own logic."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3872,"startedAt":"2026-07-11T07:38:56.186Z","completedAt":"2026-07-11T07:39:00.145Z","answerBytes":767,"answerChars":767,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11849,"completionTokens":1182,"totalTokens":13031,"reasoningTokens":906,"cachedTokens":11520},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local hpText = hp .. \" HP\"\n\n    surface.SetDrawColor(0, 0, 0, 180)\n    surface.DrawRect(16, 16, 160, 60)\n    draw.SimpleText(hpText, \"DermaLarge\", 20, 24, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText(\"Health\", \"DermaDefault\", 20, 54, Color(180, 180, 180, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText(\"x\" .. hp, \"DermaDefault\", 172, 32, Color(255, 200, 0, 255), TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP)\nend)\n```\nReason: Cache `LocalPlayer()` and `:Health()` once per `HUDPaint` call so all three draw calls use the same local value, avoiding repeated native lookups. ","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local hpText = hp .. \" HP\"\n\n    surface.SetDrawColor(0, 0, 0, 180)\n    surface.DrawRect(16, 16, 160, 60)\n    draw.SimpleText(hpText, \"DermaLarge\", 20, 24, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText(\"Health\", \"DermaDefault\", 20, 54, Color(180, 180, 180, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)\n    draw.SimpleText(\"x\" .. hp, \"DermaDefault\", 172, 32, Color(255, 200, 0, 255), TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP)\nend)\n```\nReason: Cache `LocalPlayer()` and `:Health()` once per `HUDPaint` call so all three draw calls use the same local value, avoiding repeated native lookups. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6361,"startedAt":"2026-07-11T07:38:56.258Z","completedAt":"2026-07-11T07:39:02.641Z","answerBytes":538,"answerChars":538,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11837,"completionTokens":1011,"totalTokens":12848,"reasoningTokens":846,"cachedTokens":0},"finalResponse":"```lua\n-- module/file scope\nlocal WHITE = color_white   -- one Color object, not recreated in paint\n\nfunction PANEL:Paint(w, h)\n    if not self.entries or #self.entries == 0 then return end\n\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, #self.entries do\n        local e = self.entries[i]\n        surface.DrawRect(e.x, e.y, e.w, e.h)\n    end\nend\n```\nReason: `Color()` allocates a new color each call, so build once and reuse it (or use `color_white`) by setting draw color before the loop, since the color is invariant across iterations.","model_patch":"```lua\n-- module/file scope\nlocal WHITE = color_white   -- one Color object, not recreated in paint\n\nfunction PANEL:Paint(w, h)\n    if not self.entries or #self.entries == 0 then return end\n\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, #self.entries do\n        local e = self.entries[i]\n        surface.DrawRect(e.x, e.y, e.w, e.h)\n    end\nend\n```\nReason: `Color()` allocates a new color each call, so build once and reuse it (or use `color_white`) by setting draw color before the loop, since the color is invariant across iterations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3631,"startedAt":"2026-07-11T07:38:56.449Z","completedAt":"2026-07-11T07:39:00.144Z","answerBytes":286,"answerChars":286,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11839,"completionTokens":505,"totalTokens":12344,"reasoningTokens":405,"cachedTokens":11520},"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local angle = i * 0.01\n    result[i] = sin(angle)\nend\n```\nReason: Caching `math.sin` in a local removes a table/global lookup each iteration, so the hot loop uses a fast local variable lookup instead of repeated `math` field access.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local angle = i * 0.01\n    result[i] = sin(angle)\nend\n```\nReason: Caching `math.sin` in a local removes a table/global lookup each iteration, so the hot loop uses a fast local variable lookup instead of repeated `math` field access."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5078,"startedAt":"2026-07-11T07:38:56.701Z","completedAt":"2026-07-11T07:39:01.781Z","answerBytes":748,"answerChars":748,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":1688,"totalTokens":13532,"reasoningTokens":1477,"cachedTokens":11520},"finalResponse":"```lua\n-- Client-side: cache LocalPlayer once, refresh only when needed\nlocal lp = nil\n\nlocal function refreshLocalPlayer()\n    local p = LocalPlayer()\n    if IsValid(p) then\n        lp = p\n    end\nend\n\nhook.Add(\"InitPostEntity\", \"cache_localplayer\", refreshLocalPlayer)\n\nhook.Add(\"Think\", \"ensure_localplayer_cached\", function()\n    if not IsValid(lp) then\n        refreshLocalPlayer()\n    end\nend)\n\nlocal function DoHotWork()\n    local ply = lp -- no LocalPlayer() lookup here\n    if not IsValid(ply) then return end\n\n    -- use ply repeatedly\nend\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only refresh it on cache miss/startup so hot code reads a pre-fetched local player reference instead of repeatedly calling the global lookup.","model_patch":"```lua\n-- Client-side: cache LocalPlayer once, refresh only when needed\nlocal lp = nil\n\nlocal function refreshLocalPlayer()\n    local p = LocalPlayer()\n    if IsValid(p) then\n        lp = p\n    end\nend\n\nhook.Add(\"InitPostEntity\", \"cache_localplayer\", refreshLocalPlayer)\n\nhook.Add(\"Think\", \"ensure_localplayer_cached\", function()\n    if not IsValid(lp) then\n        refreshLocalPlayer()\n    end\nend)\n\nlocal function DoHotWork()\n    local ply = lp -- no LocalPlayer() lookup here\n    if not IsValid(ply) then return end\n\n    -- use ply repeatedly\nend\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only refresh it on cache miss/startup so hot code reads a pre-fetched local player reference instead of repeatedly calling the global lookup."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":4709,"startedAt":"2026-07-11T07:38:56.764Z","completedAt":"2026-07-11T07:39:01.477Z","answerBytes":1055,"answerChars":1055,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11856,"completionTokens":1698,"totalTokens":13554,"reasoningTokens":1350,"cachedTokens":0},"finalResponse":"```lua\nlocal LOOK_COS = math.cos(math.rad(35))\nlocal LOOK_COS2 = LOOK_COS * LOOK_COS\nlocal MAX_DIST_SQR = 1000 * 1000\n\nlocal function AreLookingAtEachOther(plyA, plyB)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    local posA = plyA:EyePos()\n    local posB = plyB:EyePos()\n    local toB = posB - posA\n    local distSqr = toB:LengthSqr()\n\n    if distSqr <= 0 or distSqr > MAX_DIST_SQR then return false end\n\n    local aForward = plyA:EyeAngles():Forward()\n    local bForward = plyB:EyeAngles():Forward()\n\n    local aDot = aForward:Dot(toB)            -- wants A looking toward B\n    if aDot <= 0 or aDot * aDot < LOOK_COS2 * distSqr then return false end\n\n    local bDot = bForward:Dot(-toB)           -- wants B looking toward A\n    if bDot <= 0 or bDot * bDot < LOOK_COS2 * distSqr then return false end\n\n    return true\nend\n``` \nReason: This checks both gaze directions with vector dot products against a cosine threshold (and avoids `acos`), using squared values to skip square roots for a very cheap, rough face-to-face test.","model_patch":"```lua\nlocal LOOK_COS = math.cos(math.rad(35))\nlocal LOOK_COS2 = LOOK_COS * LOOK_COS\nlocal MAX_DIST_SQR = 1000 * 1000\n\nlocal function AreLookingAtEachOther(plyA, plyB)\n    if not IsValid(plyA) or not IsValid(plyB) then return false end\n\n    local posA = plyA:EyePos()\n    local posB = plyB:EyePos()\n    local toB = posB - posA\n    local distSqr = toB:LengthSqr()\n\n    if distSqr <= 0 or distSqr > MAX_DIST_SQR then return false end\n\n    local aForward = plyA:EyeAngles():Forward()\n    local bForward = plyB:EyeAngles():Forward()\n\n    local aDot = aForward:Dot(toB)            -- wants A looking toward B\n    if aDot <= 0 or aDot * aDot < LOOK_COS2 * distSqr then return false end\n\n    local bDot = bForward:Dot(-toB)           -- wants B looking toward A\n    if bDot <= 0 or bDot * bDot < LOOK_COS2 * distSqr then return false end\n\n    return true\nend\n``` \nReason: This checks both gaze directions with vector dot products against a cosine threshold (and avoids `acos`), using squared values to skip square roots for a very cheap, rough face-to-face test."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5006,"startedAt":"2026-07-11T07:38:56.766Z","completedAt":"2026-07-11T07:39:01.779Z","answerBytes":276,"answerChars":275,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":1372,"totalTokens":13220,"reasoningTokens":1289,"cachedTokens":11520},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `ply:SomeHelper()` is syntax sugar for `ply.SomeHelper(ply)`, so in Luа the call overhead is equivalent; in hot paths, performance differences are negligible and you should choose the form based on design (standalone helper vs true method).","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `ply:SomeHelper()` is syntax sugar for `ply.SomeHelper(ply)`, so in Luа the call overhead is equivalent; in hot paths, performance differences are negligible and you should choose the form based on design (standalone helper vs true method)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":5924,"startedAt":"2026-07-11T07:38:57.363Z","completedAt":"2026-07-11T07:39:03.573Z","answerBytes":327,"answerChars":327,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":884,"totalTokens":12727,"reasoningTokens":774,"cachedTokens":0},"finalResponse":"```lua\nlocal console = Msg -- cache global lookup once\n\n-- inside hot loop/hot path\nconsole(\"[DBG] id=\" .. tostring(entID) .. \" hp=\" .. hp .. \"\\n\")\n```\nReason: `Msg` is a lower-overhead GMod console writer than `print`, since it skips `print`'s vararg/tostring+tab+newline formatting and writes one precomposed string directly.","model_patch":"```lua\nlocal console = Msg -- cache global lookup once\n\n-- inside hot loop/hot path\nconsole(\"[DBG] id=\" .. tostring(entID) .. \" hp=\" .. hp .. \"\\n\")\n```\nReason: `Msg` is a lower-overhead GMod console writer than `print`, since it skips `print`'s vararg/tostring+tab+newline formatting and writes one precomposed string directly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6919,"startedAt":"2026-07-11T07:38:57.368Z","completedAt":"2026-07-11T07:39:04.362Z","answerBytes":435,"answerChars":435,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11853,"completionTokens":570,"totalTokens":12423,"reasoningTokens":418,"cachedTokens":11520},"finalResponse":"```lua\n-- fastest typical loop for a dense numeric array in Garry's Mod Lua\nlocal arr = { 1, 2, 3, 4, 5 }\nlocal n = #arr\nfor i = 1, n do\n    local v = arr[i]\n    -- process v\nend\n```\nReason: For dense, numeric-indexed arrays, a numeric `for` with cached `#arr` is fastest because it does direct array indexing in the VM loop, while `ipairs`/`pairs` add iterator-call overhead and `pairs` is hash-walk based (slower and non-sequential).","model_patch":"```lua\n-- fastest typical loop for a dense numeric array in Garry's Mod Lua\nlocal arr = { 1, 2, 3, 4, 5 }\nlocal n = #arr\nfor i = 1, n do\n    local v = arr[i]\n    -- process v\nend\n```\nReason: For dense, numeric-indexed arrays, a numeric `for` with cached `#arr` is fastest because it does direct array indexing in the VM loop, while `ipairs`/`pairs` add iterator-call overhead and `pairs` is hash-walk based (slower and non-sequential)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6085,"startedAt":"2026-07-11T07:38:57.714Z","completedAt":"2026-07-11T07:39:03.888Z","answerBytes":830,"answerChars":830,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11859,"completionTokens":1490,"totalTokens":13349,"reasoningTokens":1252,"cachedTokens":11520},"finalResponse":"```lua\n-- DarkRP fn style does Filter(...)->Map(...) creating intermediate tables.\n-- Do both steps in one pass instead.\n\nlocal function transformPlayers(players)\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        -- filter\n        if IsValid(ply) and ply:Alive() and not ply:IsAFK() then\n            -- map\n            n = n + 1\n            out[n] = {\n                name = ply:Nick(),\n                steamid = ply:SteamID64(),\n                money = ply:getDarkRPVar(\"money\")\n            }\n        end\n    end\n\n    return out\nend\n\nlocal filteredMapped = transformPlayers(player.GetAll())\n```\nReason: One pass, one output table, and no fn combinator chaining means fewer function calls, no intermediate tables, and lower GC pressure than fn.Filter+fn.Map in Garry's Mod Lua.","model_patch":"```lua\n-- DarkRP fn style does Filter(...)->Map(...) creating intermediate tables.\n-- Do both steps in one pass instead.\n\nlocal function transformPlayers(players)\n    local out = {}\n    local n = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        -- filter\n        if IsValid(ply) and ply:Alive() and not ply:IsAFK() then\n            -- map\n            n = n + 1\n            out[n] = {\n                name = ply:Nick(),\n                steamid = ply:SteamID64(),\n                money = ply:getDarkRPVar(\"money\")\n            }\n        end\n    end\n\n    return out\nend\n\nlocal filteredMapped = transformPlayers(player.GetAll())\n```\nReason: One pass, one output table, and no fn combinator chaining means fewer function calls, no intermediate tables, and lower GC pressure than fn.Filter+fn.Map in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":10626,"startedAt":"2026-07-11T07:38:57.723Z","completedAt":"2026-07-11T07:39:08.379Z","answerBytes":1168,"answerChars":1168,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11862,"completionTokens":1630,"totalTokens":13492,"reasoningTokens":1286,"cachedTokens":0},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal cachedPlayerIndex = {}\n\nlocal function AddCachedPlayer(ply)\n    if not IsValid(ply) or cachedPlayerIndex[ply] then return end\n    cachedPlayerIndex[ply] = #cachedPlayers + 1\n    cachedPlayers[#cachedPlayers + 1] = ply\nend\n\nlocal function RemoveCachedPlayer(ply)\n    local idx = cachedPlayerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #cachedPlayers\n    local lastPly = cachedPlayers[lastIdx]\n\n    cachedPlayers[idx] = lastPly\n    cachedPlayerIndex[lastPly] = idx\n\n    cachedPlayers[lastIdx] = nil\n    cachedPlayerIndex[ply] = nil\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyPlayerCache_Add\", function(ply)\n    AddCachedPlayer(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyPlayerCache_Remove\", function(ply)\n    RemoveCachedPlayer(ply)\nend)\n\nhook.Add(\"Think\", \"MyThinkCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- do per-tick work on ply here\n        end\n    end\nend)\n```\nReason: Use a mutable cache updated only in `PlayerInitialSpawn` and `PlayerDisconnected`, then iterate that cached list in `Think` so `player.GetAll()` is not called every tick.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal cachedPlayerIndex = {}\n\nlocal function AddCachedPlayer(ply)\n    if not IsValid(ply) or cachedPlayerIndex[ply] then return end\n    cachedPlayerIndex[ply] = #cachedPlayers + 1\n    cachedPlayers[#cachedPlayers + 1] = ply\nend\n\nlocal function RemoveCachedPlayer(ply)\n    local idx = cachedPlayerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #cachedPlayers\n    local lastPly = cachedPlayers[lastIdx]\n\n    cachedPlayers[idx] = lastPly\n    cachedPlayerIndex[lastPly] = idx\n\n    cachedPlayers[lastIdx] = nil\n    cachedPlayerIndex[ply] = nil\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"MyPlayerCache_Add\", function(ply)\n    AddCachedPlayer(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"MyPlayerCache_Remove\", function(ply)\n    RemoveCachedPlayer(ply)\nend)\n\nhook.Add(\"Think\", \"MyThinkCachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        if IsValid(ply) then\n            -- do per-tick work on ply here\n        end\n    end\nend)\n```\nReason: Use a mutable cache updated only in `PlayerInitialSpawn` and `PlayerDisconnected`, then iterate that cached list in `Think` so `player.GetAll()` is not called every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":5776,"startedAt":"2026-07-11T07:38:57.892Z","completedAt":"2026-07-11T07:39:04.362Z","answerBytes":764,"answerChars":764,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1754,"totalTokens":13597,"reasoningTokens":1514,"cachedTokens":11520},"finalResponse":"```lua\nlocal plyCache = {} -- [ply:EntIndex()] = player temp state table\n\nlocal function cacheFor(ply)\n    local idx = ply:EntIndex()\n    local c = plyCache[idx]\n    if not c then\n        c = {}\n        plyCache[idx] = c\n    end\n    return c\nend\n\n-- write\nfunction setTempValue(ply, v)\n    cacheFor(ply).someField = v\nend\n\n-- fast read in hot loops\nfunction getTempValue(ply)\n    local c = plyCache[ply:EntIndex()]\n    return c and c.someField or nil\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearPlyCache\", function(ply)\n    plyCache[ply:EntIndex()] = nil\nend)\n```\nReason: Store per-player temp data in an EntIndex-keyed Lua table so hot reads are plain integer-key table lookups, avoiding entity-table/metatable overhead from assigning properties directly on `ply`.\n","model_patch":"```lua\nlocal plyCache = {} -- [ply:EntIndex()] = player temp state table\n\nlocal function cacheFor(ply)\n    local idx = ply:EntIndex()\n    local c = plyCache[idx]\n    if not c then\n        c = {}\n        plyCache[idx] = c\n    end\n    return c\nend\n\n-- write\nfunction setTempValue(ply, v)\n    cacheFor(ply).someField = v\nend\n\n-- fast read in hot loops\nfunction getTempValue(ply)\n    local c = plyCache[ply:EntIndex()]\n    return c and c.someField or nil\nend\n\nhook.Add(\"PlayerDisconnected\", \"ClearPlyCache\", function(ply)\n    plyCache[ply:EntIndex()] = nil\nend)\n```\nReason: Store per-player temp data in an EntIndex-keyed Lua table so hot reads are plain integer-key table lookups, avoiding entity-table/metatable overhead from assigning properties directly on `ply`.\n"}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":5294,"startedAt":"2026-07-11T07:38:58.232Z","completedAt":"2026-07-11T07:39:03.887Z","answerBytes":602,"answerChars":602,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":863,"totalTokens":12711,"reasoningTokens":650,"cachedTokens":0},"finalResponse":"```lua\nlocal values = { \"a\", \"b\", \"c\", \"d\", \"e\" } -- contiguous numeric keys (array shape)\nlocal byName = { a = \"a\", b = \"b\", c = \"c\", d = \"d\", e = \"e\" } -- string-keyed map shape\n\nlocal sum_array = 0\nfor i = 1, #values do\n    local v = values[i]\n    sum_array = sum_array + i\nend\n\nlocal sum_map = 0\nfor _k, v in pairs(byName) do\n    sum_map = sum_map + string.len(v)\nend\n```\nReason: Use a contiguous number-keyed array (`1..n` with `ipairs`/numeric `for`) for fixed collections because it iterates via Lua's dense array path, which is faster and more cache-friendly than hashing string keys in a map. ","model_patch":"```lua\nlocal values = { \"a\", \"b\", \"c\", \"d\", \"e\" } -- contiguous numeric keys (array shape)\nlocal byName = { a = \"a\", b = \"b\", c = \"c\", d = \"d\", e = \"e\" } -- string-keyed map shape\n\nlocal sum_array = 0\nfor i = 1, #values do\n    local v = values[i]\n    sum_array = sum_array + i\nend\n\nlocal sum_map = 0\nfor _k, v in pairs(byName) do\n    sum_map = sum_map + string.len(v)\nend\n```\nReason: Use a contiguous number-keyed array (`1..n` with `ipairs`/numeric `for`) for fixed collections because it iterates via Lua's dense array path, which is faster and more cache-friendly than hashing string keys in a map. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":5077,"startedAt":"2026-07-11T07:38:58.303Z","completedAt":"2026-07-11T07:39:03.979Z","answerBytes":533,"answerChars":533,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11853,"completionTokens":1047,"totalTokens":12900,"reasoningTokens":860,"cachedTokens":11520},"finalResponse":"```lua\n-- Fast path for hot draw: keep function references and raw color scalars\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nlocal r, g, b, a = 30, 180, 255, 255\n\nhook.Add(\"PostRenderVGUI\", \"FastDrawPath\", function()\n    for i = 1, 256 do\n        SetDrawColor(r, g, b, a)\n        DrawRect(10, 10 + i, 128, 2)\n    end\nend)\n```\nReason: Using `SetDrawColor(r, g, b, a)` in a cached-upvalue path avoids constructing or indexing a `Color` object on each draw call, which is the cheaper form for hot loops.","model_patch":"```lua\n-- Fast path for hot draw: keep function references and raw color scalars\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nlocal r, g, b, a = 30, 180, 255, 255\n\nhook.Add(\"PostRenderVGUI\", \"FastDrawPath\", function()\n    for i = 1, 256 do\n        SetDrawColor(r, g, b, a)\n        DrawRect(10, 10 + i, 128, 2)\n    end\nend)\n```\nReason: Using `SetDrawColor(r, g, b, a)` in a cached-upvalue path avoids constructing or indexing a `Color` object on each draw call, which is the cheaper form for hot loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4413,"startedAt":"2026-07-11T07:38:58.355Z","completedAt":"2026-07-11T07:39:03.299Z","answerBytes":568,"answerChars":568,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11869,"completionTokens":719,"totalTokens":12588,"reasoningTokens":542,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamID = \"STEAM_0:1:123456\"\n\n-- SQLite (local, sql library)\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid = \" .. SQLStr(steamID))\n\nif row then\n    print(\"coins:\", tonumber(row.coins))\nelse\n    sql.Query(\"INSERT INTO player_data (steamid, coins) VALUES (\" .. SQLStr(steamID) .. \", 0)\")\nend\n```\nReason: On a single GMod server with no cross-server sync, local SQLite via the built-in `sql` API is typically lower latency because it avoids remote network/database server round-trips, reducing read/write overhead compared with MySQL.","model_patch":"```lua\nlocal steamID = \"STEAM_0:1:123456\"\n\n-- SQLite (local, sql library)\nlocal row = sql.QueryRow(\"SELECT coins FROM player_data WHERE steamid = \" .. SQLStr(steamID))\n\nif row then\n    print(\"coins:\", tonumber(row.coins))\nelse\n    sql.Query(\"INSERT INTO player_data (steamid, coins) VALUES (\" .. SQLStr(steamID) .. \", 0)\")\nend\n```\nReason: On a single GMod server with no cross-server sync, local SQLite via the built-in `sql` API is typically lower latency because it avoids remote network/database server round-trips, reducing read/write overhead compared with MySQL."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5351,"startedAt":"2026-07-11T07:38:58.586Z","completedAt":"2026-07-11T07:39:05.278Z","answerBytes":831,"answerChars":831,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11840,"completionTokens":1609,"totalTokens":13449,"reasoningTokens":1355,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" }) -- weak keys, auto-free disconnected players\n\nlocal function GetCachedSteamID(ply)\n    if not IsValid(ply) then return nil end\n\n    local sid = steamIDCache[ply]\n    if sid == nil then\n        sid = ply:SteamID()\n        steamIDCache[ply] = sid\n    end\n\n    return sid\nend\n\nhook.Add(\"PlayerDisconnected\", \"cache_purge_steamid\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- hot path\nhook.Add(\"Think\", \"example_hotpath\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local sid = GetCachedSteamID(ply)\n        -- use sid\n    end\nend)\n```\nReason: Cache each player's SteamID once per entity in a weak-key Lua table so hot-path code uses O(1) local lookups instead of repeated `ply:SteamID()` calls, and clear on disconnect to prevent stale entries.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" }) -- weak keys, auto-free disconnected players\n\nlocal function GetCachedSteamID(ply)\n    if not IsValid(ply) then return nil end\n\n    local sid = steamIDCache[ply]\n    if sid == nil then\n        sid = ply:SteamID()\n        steamIDCache[ply] = sid\n    end\n\n    return sid\nend\n\nhook.Add(\"PlayerDisconnected\", \"cache_purge_steamid\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\n-- hot path\nhook.Add(\"Think\", \"example_hotpath\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local sid = GetCachedSteamID(ply)\n        -- use sid\n    end\nend)\n```\nReason: Cache each player's SteamID once per entity in a weak-key Lua table so hot-path code uses O(1) local lookups instead of repeated `ply:SteamID()` calls, and clear on disconnect to prevent stale entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4198,"startedAt":"2026-07-11T07:38:59.173Z","completedAt":"2026-07-11T07:39:04.160Z","answerBytes":476,"answerChars":476,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":765,"totalTokens":12608,"reasoningTokens":602,"cachedTokens":11520},"finalResponse":"```lua\n-- Slow: repeated concatenation in a loop (creates new strings each step)\nlocal slow = \"\"\nfor i = 1, 5000 do\n    slow = slow .. \"piece \" .. i .. \", \"\nend\n\n-- Fast: collect chunks then concatenate once\nlocal chunks = {}\nfor i = 1, 5000 do\n    chunks[#chunks + 1] = \"piece \" .. i .. \", \"\nend\nlocal fast = table.concat(chunks)\n``` \nReason: `table.concat` concatenates all pieces in one C-level pass, avoiding the repeated reallocations and copies caused by `..` in a loop.","model_patch":"```lua\n-- Slow: repeated concatenation in a loop (creates new strings each step)\nlocal slow = \"\"\nfor i = 1, 5000 do\n    slow = slow .. \"piece \" .. i .. \", \"\nend\n\n-- Fast: collect chunks then concatenate once\nlocal chunks = {}\nfor i = 1, 5000 do\n    chunks[#chunks + 1] = \"piece \" .. i .. \", \"\nend\nlocal fast = table.concat(chunks)\n``` \nReason: `table.concat` concatenates all pieces in one C-level pass, avoiding the repeated reallocations and copies caused by `..` in a loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4867,"startedAt":"2026-07-11T07:38:59.215Z","completedAt":"2026-07-11T07:39:05.004Z","answerBytes":464,"answerChars":464,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":752,"totalTokens":12599,"reasoningTokens":606,"cachedTokens":11520},"finalResponse":"```lua\n-- faster for non-rounded filled rectangles in GMod\nlocal setDrawColor = surface.SetDrawColor\nlocal drawRect = surface.DrawRect\n\nfor _, r in ipairs(rects) do\n    setDrawColor(r.r, r.g, r.b, r.a or 255)\n    drawRect(r.x, r.y, r.w, r.h)\nend\n```\nReason: Use `surface.SetDrawColor` + `surface.DrawRect` to skip the rounded-box path (`draw.RoundedBox` uses extra corner/border logic) and avoid function-level corner handling when drawing plain filled rectangles.","model_patch":"```lua\n-- faster for non-rounded filled rectangles in GMod\nlocal setDrawColor = surface.SetDrawColor\nlocal drawRect = surface.DrawRect\n\nfor _, r in ipairs(rects) do\n    setDrawColor(r.r, r.g, r.b, r.a or 255)\n    drawRect(r.x, r.y, r.w, r.h)\nend\n```\nReason: Use `surface.SetDrawColor` + `surface.DrawRect` to skip the rounded-box path (`draw.RoundedBox` uses extra corner/border logic) and avoid function-level corner handling when drawing plain filled rectangles."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4596,"startedAt":"2026-07-11T07:38:59.272Z","completedAt":"2026-07-11T07:39:04.778Z","answerBytes":642,"answerChars":642,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":1239,"totalTokens":13085,"reasoningTokens":1020,"cachedTokens":11520},"finalResponse":"```lua\n-- Pre-create once\nsurface.CreateFont(\"FastHUDFont\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n    antialias = true\n})\n\nlocal msg = \"Ready\"\nlocal x, y = 16, 16\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"FastHUDFont\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(msg)\nend)\n```\nReason: Use only the low-level `surface.*` text path (`SetFont`, `SetTextColor`, `SetTextPos`, `DrawText`) because it avoids the extra alignment, parsing, and outline/shadow work done by `draw.DrawText` and `SimpleTextOutlined` while drawing one line each frame.","model_patch":"```lua\n-- Pre-create once\nsurface.CreateFont(\"FastHUDFont\", {\n    font = \"Roboto\",\n    size = 24,\n    weight = 500,\n    antialias = true\n})\n\nlocal msg = \"Ready\"\nlocal x, y = 16, 16\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"FastHUDFont\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(x, y)\n    surface.DrawText(msg)\nend)\n```\nReason: Use only the low-level `surface.*` text path (`SetFont`, `SetTextColor`, `SetTextPos`, `DrawText`) because it avoids the extra alignment, parsing, and outline/shadow work done by `draw.DrawText` and `SimpleTextOutlined` while drawing one line each frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3981,"startedAt":"2026-07-11T07:38:59.349Z","completedAt":"2026-07-11T07:39:04.160Z","answerBytes":226,"answerChars":226,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11836,"completionTokens":274,"totalTokens":12110,"reasoningTokens":194,"cachedTokens":11520},"finalResponse":"```lua\nlocal arr = {10, 20, 30}\nlocal n = #arr\n```\nReason: `#arr` is the canonical Lua length operator for sequential (1-based, contiguous) array-like tables, which is what Garry's Mod Lua expects for normal list-style tables.","model_patch":"```lua\nlocal arr = {10, 20, 30}\nlocal n = #arr\n```\nReason: `#arr` is the canonical Lua length operator for sequential (1-based, contiguous) array-like tables, which is what Garry's Mod Lua expects for normal list-style tables."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5922,"startedAt":"2026-07-11T07:39:00.177Z","completedAt":"2026-07-11T07:39:06.266Z","answerBytes":314,"answerChars":314,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":1823,"totalTokens":13670,"reasoningTokens":1729,"cachedTokens":11520},"finalResponse":"```lua\n-- Fast path for frequent full clears of a large array-like table\nt = {}\n```\nReason: `t = {}` is generally faster because it drops the old table in O(1), while `table.Empty(t)` must clear each key/value pair (O(n)); only use `table.Empty` when you must preserve existing table identity for other references.","model_patch":"```lua\n-- Fast path for frequent full clears of a large array-like table\nt = {}\n```\nReason: `t = {}` is generally faster because it drops the old table in O(1), while `table.Empty(t)` must clear each key/value pair (O(n)); only use `table.Empty` when you must preserve existing table identity for other references."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4931,"startedAt":"2026-07-11T07:39:00.260Z","completedAt":"2026-07-11T07:39:05.448Z","answerBytes":612,"answerChars":612,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":804,"totalTokens":12651,"reasoningTokens":597,"cachedTokens":11520},"finalResponse":"```lua\nlocal roleList = {\n    \"admin\",\n    \"moderator\",\n    \"superadmin\",\n}\n\nlocal function MakeSet(values)\n    local set = {}\n    for _, v in ipairs(values) do\n        set[v] = true\n    end\n    return set\nend\n\nlocal roleSet = MakeSet(roleList)\n\nlocal role = \"moderator\"\nif roleSet[role] then\n    print(\"allowed\")\nelse\n    print(\"denied\")\nend\n\n-- slower equivalent on a list:\n-- if table.HasValue(roleList, role) then ...\n-- that call loops every element each time\n```\nReason: Use a set-map table (`set[value] = true`) for O(1) lookups instead of `table.HasValue`, which does an O(n) scan on the list each check.","model_patch":"```lua\nlocal roleList = {\n    \"admin\",\n    \"moderator\",\n    \"superadmin\",\n}\n\nlocal function MakeSet(values)\n    local set = {}\n    for _, v in ipairs(values) do\n        set[v] = true\n    end\n    return set\nend\n\nlocal roleSet = MakeSet(roleList)\n\nlocal role = \"moderator\"\nif roleSet[role] then\n    print(\"allowed\")\nelse\n    print(\"denied\")\nend\n\n-- slower equivalent on a list:\n-- if table.HasValue(roleList, role) then ...\n-- that call loops every element each time\n```\nReason: Use a set-map table (`set[value] = true`) for O(1) lookups instead of `table.HasValue`, which does an O(n) scan on the list each check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4537,"startedAt":"2026-07-11T07:39:00.289Z","completedAt":"2026-07-11T07:39:05.278Z","answerBytes":286,"answerChars":286,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":543,"totalTokens":12387,"reasoningTokens":452,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster: initialize known fields directly in the constructor.\nlocal t = { health = 100, armor = 50, speed = 250 }\n```\nReason: `local t = { ... }` does one allocation plus immediate field setup, while `local t = {}; t.health = ...` adds extra assignment steps and table writes. ","model_patch":"```lua\n-- Faster: initialize known fields directly in the constructor.\nlocal t = { health = 100, armor = 50, speed = 250 }\n```\nReason: `local t = { ... }` does one allocation plus immediate field setup, while `local t = {}; t.health = ...` adds extra assignment steps and table writes. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4933,"startedAt":"2026-07-11T07:39:00.313Z","completedAt":"2026-07-11T07:39:05.932Z","answerBytes":331,"answerChars":331,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":480,"totalTokens":12318,"reasoningTokens":371,"cachedTokens":11520},"finalResponse":"```lua\nlocal function randomFromSequential(tbl)\n    local n = #tbl\n    if n == 0 then return nil end\n    return tbl[math.random(1, n)]\nend\n```\n\nReason: For a sequential array, indexing directly with a precomputed `math.random(1, #tbl)` is O(1), avoiding `table.Random`'s extra key scanning/dispatch and mixed-key handling overhead.","model_patch":"```lua\nlocal function randomFromSequential(tbl)\n    local n = #tbl\n    if n == 0 then return nil end\n    return tbl[math.random(1, n)]\nend\n```\n\nReason: For a sequential array, indexing directly with a precomputed `math.random(1, #tbl)` is O(1), avoiding `table.Random`'s extra key scanning/dispatch and mixed-key handling overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6839,"startedAt":"2026-07-11T07:39:00.882Z","completedAt":"2026-07-11T07:39:07.954Z","answerBytes":236,"answerChars":236,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11837,"completionTokens":676,"totalTokens":12513,"reasoningTokens":576,"cachedTokens":11520},"finalResponse":"```lua\nlocal acc = 0\n\nfor i = 1, 1000000 do\n    local x2 = x * x\n    acc = acc + x2\nend\n```\nReason: `x * x` is the preferred fast form in Lua/GLua hot paths, avoiding `math.pow`/`^2` overhead and keeping a single integer/float multiply.","model_patch":"```lua\nlocal acc = 0\n\nfor i = 1, 1000000 do\n    local x2 = x * x\n    acc = acc + x2\nend\n```\nReason: `x * x` is the preferred fast form in Lua/GLua hot paths, avoiding `math.pow`/`^2` overhead and keeping a single integer/float multiply."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.3-codex-spark@medium","model_name_or_path":"gpt-5.3-codex-spark@medium","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":5870,"startedAt":"2026-07-11T07:39:00.922Z","completedAt":"2026-07-11T07:39:07.109Z","answerBytes":211,"answerChars":211,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":467,"totalTokens":12318,"reasoningTokens":394,"cachedTokens":11520},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    print(ply:Nick())\nend\n```\nReason: `player.GetAll()` returns all connected players, and `ipairs` safely iterates the list entries exactly once in numeric order.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    print(ply:Nick())\nend\n```\nReason: `player.GetAll()` returns all connected players, and `ipairs` safely iterates the list entries exactly once in numeric order."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5440,"startedAt":"2026-07-11T07:39:01.480Z","completedAt":"2026-07-11T07:39:06.980Z","answerBytes":313,"answerChars":313,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":987,"totalTokens":12829,"reasoningTokens":888,"cachedTokens":0},"finalResponse":"```lua\nfor ent in ents.Iterator() do\n    if IsValid(ent) and ent:GetClass() == \"prop_physics\" then\n        -- do something with this prop_physics entity\n    end\nend\n```\nReason: `ents.Iterator()` walks the entity list directly, so you avoid creating a full table first like `ents.GetAll()` or `ents.FindByClass()`.","model_patch":"```lua\nfor ent in ents.Iterator() do\n    if IsValid(ent) and ent:GetClass() == \"prop_physics\" then\n        -- do something with this prop_physics entity\n    end\nend\n```\nReason: `ents.Iterator()` walks the entity list directly, so you avoid creating a full table first like `ents.GetAll()` or `ents.FindByClass()`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4449,"startedAt":"2026-07-11T07:39:01.481Z","completedAt":"2026-07-11T07:39:05.932Z","answerBytes":245,"answerChars":245,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11850,"completionTokens":435,"totalTokens":12285,"reasoningTokens":355,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- callback body\nend)\n```\nReason: `hook.Add` registers your function on the `Think` event and the string `MyAddon.Think` is the hook identifier used to track/remove that specific callback.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- callback body\nend)\n```\nReason: `hook.Add` registers your function on the `Think` event and the string `MyAddon.Think` is the hook identifier used to track/remove that specific callback."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":7135,"startedAt":"2026-07-11T07:39:02.005Z","completedAt":"2026-07-11T07:39:09.317Z","answerBytes":215,"answerChars":215,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":763,"totalTokens":12604,"reasoningTokens":690,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` is the standard GMod guard that returns false for nil/invalid/deleted entities, so methods are only called on a safe entity reference.","model_patch":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: `IsValid(ent)` is the standard GMod guard that returns false for nil/invalid/deleted entities, so methods are only called on a safe entity reference."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6093,"startedAt":"2026-07-11T07:39:02.053Z","completedAt":"2026-07-11T07:39:08.488Z","answerBytes":554,"answerChars":554,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11834,"completionTokens":1621,"totalTokens":13455,"reasoningTokens":1466,"cachedTokens":0},"finalResponse":"```lua\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\n\n    net.Receive(\"MyAddon.Sync\", function(len, ply)\n        local payload = net.ReadString()\n        -- handle incoming message from client\n    end)\nelse\n    net.Receive(\"MyAddon.Sync\", function(len)\n        local payload = net.ReadString()\n        -- handle incoming message from server\n    end)\nend\n```\nReason: `net.Receive` binds a handler to incoming net traffic for `MyAddon.Sync`, and the server must call `util.AddNetworkString(\"MyAddon.Sync\")` so the message is allowed on the wire.","model_patch":"```lua\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\n\n    net.Receive(\"MyAddon.Sync\", function(len, ply)\n        local payload = net.ReadString()\n        -- handle incoming message from client\n    end)\nelse\n    net.Receive(\"MyAddon.Sync\", function(len)\n        local payload = net.ReadString()\n        -- handle incoming message from server\n    end)\nend\n```\nReason: `net.Receive` binds a handler to incoming net traffic for `MyAddon.Sync`, and the server must call `util.AddNetworkString(\"MyAddon.Sync\")` so the message is allowed on the wire."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":9737,"startedAt":"2026-07-11T07:39:02.856Z","completedAt":"2026-07-11T07:39:12.780Z","answerBytes":584,"answerChars":584,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":3523,"totalTokens":15367,"reasoningTokens":3321,"cachedTokens":11520},"finalResponse":"```lua\n-- Hot-path zero angle cache (no Angle() allocation per call)\nlocal zeroPool = {\n    Angle(),\n    Angle(),\n    Angle(),\n    Angle(),\n}\n\nlocal poolI = 0\n\nlocal function TakeZeroAngle()\n    poolI = poolI + 1\n    if poolI > #zeroPool then poolI = 1 end\n\n    local a = zeroPool[poolI]\n    a.p, a.y, a.r = 0, 0, 0 -- reset in-place\n    return a\nend\n\n-- use:\n-- local ang = TakeZeroAngle()\n-- ent:SetAngles(ang)\n```\nReason: Reset one reusable Angle from a small pool each call instead of calling Angle() each time, avoiding repeated userdata allocations and GC churn in the hot path.","model_patch":"```lua\n-- Hot-path zero angle cache (no Angle() allocation per call)\nlocal zeroPool = {\n    Angle(),\n    Angle(),\n    Angle(),\n    Angle(),\n}\n\nlocal poolI = 0\n\nlocal function TakeZeroAngle()\n    poolI = poolI + 1\n    if poolI > #zeroPool then poolI = 1 end\n\n    local a = zeroPool[poolI]\n    a.p, a.y, a.r = 0, 0, 0 -- reset in-place\n    return a\nend\n\n-- use:\n-- local ang = TakeZeroAngle()\n-- ent:SetAngles(ang)\n```\nReason: Reset one reusable Angle from a small pool each call instead of calling Angle() each time, avoiding repeated userdata allocations and GC churn in the hot path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5842,"startedAt":"2026-07-11T07:39:03.300Z","completedAt":"2026-07-11T07:39:09.145Z","answerBytes":451,"answerChars":451,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11849,"completionTokens":932,"totalTokens":12781,"reasoningTokens":810,"cachedTokens":11520},"finalResponse":"```lua\n-- Cache the setting once to a flat local for hot-path reads\nlocal addonColor = myaddon.config.color\n\n-- Frequently read access\nlocal function DrawHUD()\n    local col = addonColor\n    -- use col\nend\n```\nReason: A local variable is the fastest to read in Lua (direct slot access) while `myaddon.config.color` requires repeated global/table lookups, so cache it flat locally in hot paths; only refresh the local if the setting changes at runtime.","model_patch":"```lua\n-- Cache the setting once to a flat local for hot-path reads\nlocal addonColor = myaddon.config.color\n\n-- Frequently read access\nlocal function DrawHUD()\n    local col = addonColor\n    -- use col\nend\n```\nReason: A local variable is the fastest to read in Lua (direct slot access) while `myaddon.config.color` requires repeated global/table lookups, so cache it flat locally in hot paths; only refresh the local if the setting changes at runtime."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6249,"startedAt":"2026-07-11T07:39:03.978Z","completedAt":"2026-07-11T07:39:10.607Z","answerBytes":381,"answerChars":381,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1626,"totalTokens":13469,"reasoningTokens":1508,"cachedTokens":0},"finalResponse":"```lua\n-- Preferred DarkRP API (instead of legacy NW)\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Optional alternative if you need the full job table\nlocal jobNameFromTeam = ply:getJobTable().name\n```\nReason: `getDarkRPVar(\"job\")` is the DarkRP accessor for the replicated job value, so it stays aligned with DarkRP state changes better than using the generic `GetNWString(\"job\")`.","model_patch":"```lua\n-- Preferred DarkRP API (instead of legacy NW)\nlocal jobName = ply:getDarkRPVar(\"job\")\n\n-- Optional alternative if you need the full job table\nlocal jobNameFromTeam = ply:getJobTable().name\n```\nReason: `getDarkRPVar(\"job\")` is the DarkRP accessor for the replicated job value, so it stays aligned with DarkRP state changes better than using the generic `GetNWString(\"job\")`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8488,"startedAt":"2026-07-11T07:39:04.097Z","completedAt":"2026-07-11T07:39:12.780Z","answerBytes":338,"answerChars":338,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":516,"totalTokens":12362,"reasoningTokens":391,"cachedTokens":11520},"finalResponse":"```lua\nlocal posA = Vector(0, 0, 0)\nlocal posB = Vector(64, 0, 0)\nlocal range = 128 -- units\n\nif posA:DistToSqr(posB) <= range * range then\n    print(\"within range\")\nend\n```\nReason: `Vector:DistToSqr` compares squared distance directly, so you avoid the expensive square-root in `Distance`/`Length` when only threshold checking is needed.","model_patch":"```lua\nlocal posA = Vector(0, 0, 0)\nlocal posB = Vector(64, 0, 0)\nlocal range = 128 -- units\n\nif posA:DistToSqr(posB) <= range * range then\n    print(\"within range\")\nend\n```\nReason: `Vector:DistToSqr` compares squared distance directly, so you avoid the expensive square-root in `Distance`/`Length` when only threshold checking is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":8199,"startedAt":"2026-07-11T07:39:04.132Z","completedAt":"2026-07-11T07:39:13.062Z","answerBytes":492,"answerChars":492,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":3241,"totalTokens":15083,"reasoningTokens":3105,"cachedTokens":11520},"finalResponse":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- Handle each entity.\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        if IsValid(ent) then\n            -- Handle each entity.\n        end\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient entity enumerator because it avoids allocating a full entity table on each pass; fallback to `ents.GetAll()` only if the iterator is unavailable.","model_patch":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- Handle each entity.\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        if IsValid(ent) then\n            -- Handle each entity.\n        end\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient entity enumerator because it avoids allocating a full entity table on each pass; fallback to `ents.GetAll()` only if the iterator is unavailable."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":6990,"startedAt":"2026-07-11T07:39:04.157Z","completedAt":"2026-07-11T07:39:11.866Z","answerBytes":870,"answerChars":870,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11861,"completionTokens":1674,"totalTokens":13535,"reasoningTokens":1421,"cachedTokens":11520},"finalResponse":"```lua\n-- Server-side: near-player entity query using a faster broad-phase primitive.\n-- Replace find in a sphere with box-first filtering, then exact radius check.\nfunction GetNearbyEntitiesNearPlayer(ply, radius)\n    local origin = ply:GetPos()\n    local extent = Vector(radius, radius, radius)\n    local mins = origin - extent\n    local maxs = origin + extent\n\n    local candidates = ents.FindInBox(mins, maxs)\n    local radius2 = radius * radius\n    local out = {}\n    local n = 0\n\n    for _, ent in ipairs(candidates) do\n        if IsValid(ent) and ent ~= ply and ent:GetPos():DistToSqr(origin) <= radius2 then\n            n = n + 1\n            out[n] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: `ents.FindInBox` is commonly faster than `FindInSphere`/`FindInPVS` for broad-phase proximity checks, then `DistToSqr` keeps exact radius filtering cheap. ","model_patch":"```lua\n-- Server-side: near-player entity query using a faster broad-phase primitive.\n-- Replace find in a sphere with box-first filtering, then exact radius check.\nfunction GetNearbyEntitiesNearPlayer(ply, radius)\n    local origin = ply:GetPos()\n    local extent = Vector(radius, radius, radius)\n    local mins = origin - extent\n    local maxs = origin + extent\n\n    local candidates = ents.FindInBox(mins, maxs)\n    local radius2 = radius * radius\n    local out = {}\n    local n = 0\n\n    for _, ent in ipairs(candidates) do\n        if IsValid(ent) and ent ~= ply and ent:GetPos():DistToSqr(origin) <= radius2 then\n            n = n + 1\n            out[n] = ent\n        end\n    end\n\n    return out\nend\n```\nReason: `ents.FindInBox` is commonly faster than `FindInSphere`/`FindInPVS` for broad-phase proximity checks, then `DistToSqr` keeps exact radius filtering cheap. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7050,"startedAt":"2026-07-11T07:39:04.534Z","completedAt":"2026-07-11T07:39:12.188Z","answerBytes":531,"answerChars":531,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":1924,"totalTokens":13775,"reasoningTokens":1764,"cachedTokens":0},"finalResponse":"```lua\nlocal function GetPlayersInRadius(origin, radius)\n    local radiusSq = radius * radius\n    local out = {}\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(origin) <= radiusSq then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n```\nReason: `player.GetAll()` limits traversal to player entities only and `DistToSqr` avoids `sqrt`, so you skip scanning and filtering thousands of non-player ents from `ents.FindInSphere`. ","model_patch":"```lua\nlocal function GetPlayersInRadius(origin, radius)\n    local radiusSq = radius * radius\n    local out = {}\n    local players = player.GetAll()\n\n    for i = 1, #players do\n        local ply = players[i]\n        if ply:GetPos():DistToSqr(origin) <= radiusSq then\n            out[#out + 1] = ply\n        end\n    end\n\n    return out\nend\n```\nReason: `player.GetAll()` limits traversal to player entities only and `DistToSqr` avoids `sqrt`, so you skip scanning and filtering thousands of non-player ents from `ents.FindInSphere`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6077,"startedAt":"2026-07-11T07:39:04.590Z","completedAt":"2026-07-11T07:39:11.349Z","answerBytes":256,"answerChars":256,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":646,"totalTokens":12492,"reasoningTokens":554,"cachedTokens":0},"finalResponse":"```lua\nlocal n = 1000000\nfor i = 1, n do\n    -- hot loop work\nend\n```\nReason: Use the numeric `for` loop for fixed 1..n counting because it has the lowest per-iteration overhead in Lua/LuaJIT, while a `while` version does extra manual increment/check work.","model_patch":"```lua\nlocal n = 1000000\nfor i = 1, n do\n    -- hot loop work\nend\n```\nReason: Use the numeric `for` loop for fixed 1..n counting because it has the lowest per-iteration overhead in Lua/LuaJIT, while a `while` version does extra manual increment/check work."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18189,"startedAt":"2026-07-11T07:39:04.652Z","completedAt":"2026-07-11T07:39:23.468Z","answerBytes":840,"answerChars":840,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11858,"completionTokens":1679,"totalTokens":13537,"reasoningTokens":1437,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster pattern: one hook dispatch per tick\nlocal TICK_HOOK = \"PerfDemo.Tick\"\nlocal PLAYER_BATCH_HOOK = \"PerfDemo.ProcessPlayerBatch\"\n\nhook.Add(\"Think\", TICK_HOOK, function()\n    local players = player.GetAll()\n    hook.Run(PLAYER_BATCH_HOOK, players)\nend)\n\nhook.Add(PLAYER_BATCH_HOOK, \"PerfDemo.ProcessPlayerBatchImpl\", function(players)\n    local count = #players\n    for i = 1, count do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom per-player logic goes here\n        end\n    end\nend)\n\n-- Slower pattern to avoid:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"PerfDemo.ProcessPlayer\", ply)\n-- end\n```\nReason: One `hook.Run` call avoids repeated hook-dispatch overhead; doing the per-player loop once inside the callback keeps the same work but with fewer dispatches every tick.","model_patch":"```lua\n-- Faster pattern: one hook dispatch per tick\nlocal TICK_HOOK = \"PerfDemo.Tick\"\nlocal PLAYER_BATCH_HOOK = \"PerfDemo.ProcessPlayerBatch\"\n\nhook.Add(\"Think\", TICK_HOOK, function()\n    local players = player.GetAll()\n    hook.Run(PLAYER_BATCH_HOOK, players)\nend)\n\nhook.Add(PLAYER_BATCH_HOOK, \"PerfDemo.ProcessPlayerBatchImpl\", function(players)\n    local count = #players\n    for i = 1, count do\n        local ply = players[i]\n        if IsValid(ply) then\n            -- custom per-player logic goes here\n        end\n    end\nend)\n\n-- Slower pattern to avoid:\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(\"PerfDemo.ProcessPlayer\", ply)\n-- end\n```\nReason: One `hook.Run` call avoids repeated hook-dispatch overhead; doing the per-player loop once inside the callback keeps the same work but with fewer dispatches every tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14810,"startedAt":"2026-07-11T07:39:04.777Z","completedAt":"2026-07-11T07:39:20.251Z","answerBytes":607,"answerChars":607,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":1292,"totalTokens":13143,"reasoningTokens":1071,"cachedTokens":11520},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n    local label = \"HP: \" .. health\n\n    draw.RoundedBox(6, 20, 20, 220, 24, Color(0, 0, 0, 180))\n    draw.RoundedBox(6, 22, 22, math.max(0, health * 2), 20, Color(0, 180, 0, 220))\n    draw.SimpleText(label, \"DermaLarge\", 130, 32, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once in local variables so all three draw calls reuse the same value instead of recomputing the lookup each time.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n    local label = \"HP: \" .. health\n\n    draw.RoundedBox(6, 20, 20, 220, 24, Color(0, 0, 0, 180))\n    draw.RoundedBox(6, 22, 22, math.max(0, health * 2), 20, Color(0, 180, 0, 220))\n    draw.SimpleText(label, \"DermaLarge\", 130, 32, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)\nend)\n```\nReason: Cache `LocalPlayer()` and `Health()` once in local variables so all three draw calls reuse the same value instead of recomputing the lookup each time."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6946,"startedAt":"2026-07-11T07:39:05.138Z","completedAt":"2026-07-11T07:39:12.395Z","answerBytes":583,"answerChars":583,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11839,"completionTokens":1272,"totalTokens":13111,"reasoningTokens":1087,"cachedTokens":11520},"finalResponse":"```lua\n-- Cache the color once, not per-iteration\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    local items = getItemsToDraw()\n    if #items == 0 then return end\n\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, #items do\n        local it = items[i]\n        surface.DrawRect(it.x, it.y, it.w, it.h)\n    end\nend)\n```\nReason: `Color(255,255,255)` creates a new color object every loop iteration, while reusing one cached color and setting it once before the loop removes repeated allocations and lowers per-frame overhead in a paint path.","model_patch":"```lua\n-- Cache the color once, not per-iteration\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaintLoop\", function()\n    local items = getItemsToDraw()\n    if #items == 0 then return end\n\n    surface.SetDrawColor(WHITE)\n\n    for i = 1, #items do\n        local it = items[i]\n        surface.DrawRect(it.x, it.y, it.w, it.h)\n    end\nend)\n```\nReason: `Color(255,255,255)` creates a new color object every loop iteration, while reusing one cached color and setting it once before the loop removes repeated allocations and lowers per-frame overhead in a paint path."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14157,"startedAt":"2026-07-11T07:39:05.225Z","completedAt":"2026-07-11T07:39:19.612Z","answerBytes":423,"answerChars":423,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":610,"totalTokens":12451,"reasoningTokens":470,"cachedTokens":0},"finalResponse":"```lua\nlocal sin = math.sin -- cache once to avoid repeated math table lookup in hot path\n\nlocal function tick(count, x)\n    local sum = 0\n    for i = 1, count do\n        sum = sum + sin(x + i)\n    end\n    return sum\nend\n\n-- Called frequently:\nlocal result = tick(100000, 1.25)\n```\nReason: This turns repeated global `math` table lookups (`math.sin`) into one local upvalue access (`sin`), which is faster in Lua hot loops.","model_patch":"```lua\nlocal sin = math.sin -- cache once to avoid repeated math table lookup in hot path\n\nlocal function tick(count, x)\n    local sum = 0\n    for i = 1, count do\n        sum = sum + sin(x + i)\n    end\n    return sum\nend\n\n-- Called frequently:\nlocal result = tick(100000, 1.25)\n```\nReason: This turns repeated global `math` table lookups (`math.sin`) into one local upvalue access (`sin`), which is faster in Lua hot loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15078,"startedAt":"2026-07-11T07:39:05.448Z","completedAt":"2026-07-11T07:39:20.963Z","answerBytes":576,"answerChars":576,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":2860,"totalTokens":14702,"reasoningTokens":2689,"cachedTokens":11520},"finalResponse":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    local ply = cachedLocalPlayer\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        cachedLocalPlayer = ply\n    end\n    return ply\nend\n\nhook.Add(\"Think\", \"example_fast_localplayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply repeatedly in this frame\n    if ply:KeyDown(IN_ATTACK) then\n        -- ...\n    end\nend)\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only refresh when invalid to avoid repeated lookups in hot code paths.","model_patch":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    local ply = cachedLocalPlayer\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        cachedLocalPlayer = ply\n    end\n    return ply\nend\n\nhook.Add(\"Think\", \"example_fast_localplayer\", function()\n    local ply = GetLocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply repeatedly in this frame\n    if ply:KeyDown(IN_ATTACK) then\n        -- ...\n    end\nend)\n```\nReason: Cache `LocalPlayer()` in a local upvalue and only refresh when invalid to avoid repeated lookups in hot code paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":14866,"startedAt":"2026-07-11T07:39:05.453Z","completedAt":"2026-07-11T07:39:20.756Z","answerBytes":738,"answerChars":732,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11856,"completionTokens":2341,"totalTokens":14197,"reasoningTokens":2096,"cachedTokens":11520},"finalResponse":"```lua\nlocal LOOK_DOT = math.cos(math.rad(35))      -- ~35° cone (~70° total FOV)\nlocal MAX_DIST_SQ = 1000 * 1000             -- optional far-distance cut\n\nlocal function RoughlyLookingAtEachOther(p1, p2)\n    if not IsValid(p1) or not IsValid(p2) then return false end\n\n    local dir = p2:EyePos() - p1:EyePos()\n    if dir:LengthSqr() > MAX_DIST_SQ then return false end\n    if dir:Normalize() == 0 then return false end\n\n    local a1 = p1:GetAimVector()\n    local a2 = p2:GetAimVector()\n\n    return a1:Dot(dir) >= LOOK_DOT and a2:Dot(-dir) >= LOOK_DOT\nend\n```\nReason: Dot-product checks with normalized eye-to-eye vectors stay in O(1) math and avoid costly acos while giving a tunable “roughly facing” test via threshold constants.","model_patch":"```lua\nlocal LOOK_DOT = math.cos(math.rad(35))      -- ~35° cone (~70° total FOV)\nlocal MAX_DIST_SQ = 1000 * 1000             -- optional far-distance cut\n\nlocal function RoughlyLookingAtEachOther(p1, p2)\n    if not IsValid(p1) or not IsValid(p2) then return false end\n\n    local dir = p2:EyePos() - p1:EyePos()\n    if dir:LengthSqr() > MAX_DIST_SQ then return false end\n    if dir:Normalize() == 0 then return false end\n\n    local a1 = p1:GetAimVector()\n    local a2 = p2:GetAimVector()\n\n    return a1:Dot(dir) >= LOOK_DOT and a2:Dot(-dir) >= LOOK_DOT\nend\n```\nReason: Dot-product checks with normalized eye-to-eye vectors stay in O(1) math and avoid costly acos while giving a tunable “roughly facing” test via threshold constants."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14422,"startedAt":"2026-07-11T07:39:05.714Z","completedAt":"2026-07-11T07:39:20.355Z","answerBytes":324,"answerChars":324,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11850,"completionTokens":1650,"totalTokens":13500,"reasoningTokens":1551,"cachedTokens":11520},"finalResponse":"```lua\nlocal function SomeHelper(ply)\n    -- helper body\nend\n\nSomeHelper(ply)\n```\nReason: `ply:SomeHelper()` is syntactic sugar for a method-style call, so explicit `SomeHelper(ply)` is usually the better choice for a helper you own because it avoids per-call table method lookup and makes the `self`/argument flow explicit.","model_patch":"```lua\nlocal function SomeHelper(ply)\n    -- helper body\nend\n\nSomeHelper(ply)\n```\nReason: `ply:SomeHelper()` is syntactic sugar for a method-style call, so explicit `SomeHelper(ply)` is usually the better choice for a helper you own because it avoids per-call table method lookup and makes the `self`/argument flow explicit."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":13414,"startedAt":"2026-07-11T07:39:06.218Z","completedAt":"2026-07-11T07:39:19.747Z","answerBytes":299,"answerChars":299,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1627,"totalTokens":13470,"reasoningTokens":1521,"cachedTokens":0},"finalResponse":"```lua\nlocal log = MsgN\n\nif debugEnabled then\n    log(\"[DBG] \" .. tostring(entIndex) .. \" x=\" .. tostring(pos.x) .. \" y=\" .. tostring(pos.y))\nend\n```\nReason: `MsgN`/`Msg` writes one prebuilt string directly to the console, avoiding `print`'s slower vararg formatting and spacing logic in a hot loop.","model_patch":"```lua\nlocal log = MsgN\n\nif debugEnabled then\n    log(\"[DBG] \" .. tostring(entIndex) .. \" x=\" .. tostring(pos.x) .. \" y=\" .. tostring(pos.y))\nend\n```\nReason: `MsgN`/`Msg` writes one prebuilt string directly to the console, avoiding `print`'s slower vararg formatting and spacing logic in a hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12634,"startedAt":"2026-07-11T07:39:06.263Z","completedAt":"2026-07-11T07:39:18.974Z","answerBytes":350,"answerChars":350,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11853,"completionTokens":922,"totalTokens":12775,"reasoningTokens":784,"cachedTokens":11520},"finalResponse":"```lua\nlocal nums = {1, 2, 3, 4, 5, 6}\nlocal sum = 0\n\nlocal n = #nums\nfor i = 1, n do\n    sum = sum + nums[i]\nend\n```\nReason: Use numeric `for` on a dense, 1-based array (`for i = 1, #t`) because Garry's Mod Lua/JIT handles it with direct array indexing and one-time bounds evaluation, while `ipairs`/`pairs` pay extra iterator and dispatch overhead.","model_patch":"```lua\nlocal nums = {1, 2, 3, 4, 5, 6}\nlocal sum = 0\n\nlocal n = #nums\nfor i = 1, n do\n    sum = sum + nums[i]\nend\n```\nReason: Use numeric `for` on a dense, 1-based array (`for i = 1, #t`) because Garry's Mod Lua/JIT handles it with direct array indexing and one-time bounds evaluation, while `ipairs`/`pairs` pay extra iterator and dispatch overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15048,"startedAt":"2026-07-11T07:39:06.340Z","completedAt":"2026-07-11T07:39:21.395Z","answerBytes":721,"answerChars":721,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11859,"completionTokens":2063,"totalTokens":13922,"reasoningTokens":1850,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster DarkRP list transform than fn.Filter + fn.Map: one pass, no intermediate tables.\nlocal function getAliveCitizenNicks()\n    local players = player.GetAll()\n    local out = {}\n    local outCount = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply)\n            and not ply:IsBot()\n            and ply:Alive()\n            and ply:Team() == TEAM_CITIZEN\n        then\n            outCount = outCount + 1\n            out[outCount] = ply:Nick()\n        end\n    end\n\n    return out\nend\n\nlocal names = getAliveCitizenNicks()\n```\nReason: A single direct loop fuses filter+map into one step, avoids fn's combinator chain allocations/calls, and only allocates the final output table.","model_patch":"```lua\n-- Faster DarkRP list transform than fn.Filter + fn.Map: one pass, no intermediate tables.\nlocal function getAliveCitizenNicks()\n    local players = player.GetAll()\n    local out = {}\n    local outCount = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply)\n            and not ply:IsBot()\n            and ply:Alive()\n            and ply:Team() == TEAM_CITIZEN\n        then\n            outCount = outCount + 1\n            out[outCount] = ply:Nick()\n        end\n    end\n\n    return out\nend\n\nlocal names = getAliveCitizenNicks()\n```\nReason: A single direct loop fuses filter+map into one step, avoids fn's combinator chain allocations/calls, and only allocates the final output table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":15920,"startedAt":"2026-07-11T07:39:06.979Z","completedAt":"2026-07-11T07:39:23.810Z","answerBytes":1229,"answerChars":1229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11860,"completionTokens":2612,"totalTokens":14472,"reasoningTokens":2244,"cachedTokens":11520},"finalResponse":"```lua\nlocal playerCache = {}\nlocal playerIndex = {}\n\nlocal function cacheAddPlayer(ply)\n    if not IsValid(ply) or playerIndex[ply] then return end\n    local idx = #playerCache + 1\n    playerCache[idx] = ply\n    playerIndex[ply] = idx\nend\n\nlocal function cacheRemovePlayer(ply)\n    local idx = playerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #playerCache\n    local lastPly = playerCache[lastIdx]\n\n    playerCache[idx] = lastPly\n    playerIndex[lastPly] = idx\n\n    playerCache[lastIdx] = nil\n    playerIndex[ply] = nil\nend\n\n-- Seed cache for players already connected at startup/map start\nfor _, ply in ipairs(player.GetAll()) do\n    cacheAddPlayer(ply)\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", function(ply)\n    cacheAddPlayer(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", function(ply)\n    cacheRemovePlayer(ply)\nend)\n\nhook.Add(\"Think\", \"Think_UseCachedPlayers\", function()\n    for i = 1, #playerCache do\n        local ply = playerCache[i]\n        if IsValid(ply) then\n            -- do per-tick work with ply\n        end\n    end\nend)\n```\nReason: Cache once, then mutate the cache only on PlayerInitialSpawn/PlayerDisconnected so Think never calls player.GetAll() each tick.","model_patch":"```lua\nlocal playerCache = {}\nlocal playerIndex = {}\n\nlocal function cacheAddPlayer(ply)\n    if not IsValid(ply) or playerIndex[ply] then return end\n    local idx = #playerCache + 1\n    playerCache[idx] = ply\n    playerIndex[ply] = idx\nend\n\nlocal function cacheRemovePlayer(ply)\n    local idx = playerIndex[ply]\n    if not idx then return end\n\n    local lastIdx = #playerCache\n    local lastPly = playerCache[lastIdx]\n\n    playerCache[idx] = lastPly\n    playerIndex[lastPly] = idx\n\n    playerCache[lastIdx] = nil\n    playerIndex[ply] = nil\nend\n\n-- Seed cache for players already connected at startup/map start\nfor _, ply in ipairs(player.GetAll()) do\n    cacheAddPlayer(ply)\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", function(ply)\n    cacheAddPlayer(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", function(ply)\n    cacheRemovePlayer(ply)\nend)\n\nhook.Add(\"Think\", \"Think_UseCachedPlayers\", function()\n    for i = 1, #playerCache do\n        local ply = playerCache[i]\n        if IsValid(ply) then\n            -- do per-tick work with ply\n        end\n    end\nend)\n```\nReason: Cache once, then mutate the cache only on PlayerInitialSpawn/PlayerDisconnected so Think never calls player.GetAll() each tick."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15062,"startedAt":"2026-07-11T07:39:07.107Z","completedAt":"2026-07-11T07:39:23.196Z","answerBytes":990,"answerChars":990,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":3107,"totalTokens":14950,"reasoningTokens":2807,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster temp per-player reads: one plain Lua table keyed by EntIndex\nlocal playerData = {} -- [entIndex] = {shots=0, nextFire=0}\n\nhook.Add(\"PlayerInitialSpawn\", \"pdata_init\", function(ply)\n    playerData[ply:EntIndex()] = { shots = 0, nextFire = 0 }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"pdata_cleanup\", function(ply)\n    playerData[ply:EntIndex()] = nil\nend)\n\nlocal function getData(ply)\n    return playerData[ply:EntIndex()]\nend\n\nhook.Add(\"Think\", \"pdata_tick\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local d = getData(ply)\n        if not d then continue end\n\n        if d.nextFire <= CurTime() then\n            d.shots = d.shots + 1\n            d.nextFire = CurTime() + 0.1\n            local shots = d.shots -- fast repeated reads from cached row\n        end\n    end\nend)\n```\nReason: Using a local EntIndex-keyed table and a cached row reference removes repeated `ply.someField` entity/meta lookups in hot loops, which is faster for very frequent reads.","model_patch":"```lua\n-- Faster temp per-player reads: one plain Lua table keyed by EntIndex\nlocal playerData = {} -- [entIndex] = {shots=0, nextFire=0}\n\nhook.Add(\"PlayerInitialSpawn\", \"pdata_init\", function(ply)\n    playerData[ply:EntIndex()] = { shots = 0, nextFire = 0 }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"pdata_cleanup\", function(ply)\n    playerData[ply:EntIndex()] = nil\nend)\n\nlocal function getData(ply)\n    return playerData[ply:EntIndex()]\nend\n\nhook.Add(\"Think\", \"pdata_tick\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local d = getData(ply)\n        if not d then continue end\n\n        if d.nextFire <= CurTime() then\n            d.shots = d.shots + 1\n            d.nextFire = CurTime() + 0.1\n            local shots = d.shots -- fast repeated reads from cached row\n        end\n    end\nend)\n```\nReason: Using a local EntIndex-keyed table and a cached row reference removes repeated `ply.someField` entity/meta lookups in hot loops, which is faster for very frequent reads."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":14235,"startedAt":"2026-07-11T07:39:07.450Z","completedAt":"2026-07-11T07:39:22.719Z","answerBytes":1092,"answerChars":1092,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":1473,"totalTokens":13319,"reasoningTokens":1096,"cachedTokens":11520},"finalResponse":"```lua\nlocal SIZE = 20000\nlocal REPS = 2000\n\nlocal map = {}\nlocal arr = {}\nfor i = 1, SIZE do\n    map[\"k\" .. i] = i\n    arr[i] = i\nend\n\nlocal function bench_map(t)\n    local sum = 0\n    local t0 = SysTime()\n\n    for _ = 1, REPS do\n        for _, v in pairs(t) do\n            sum = sum + v\n        end\n    end\n\n    return SysTime() - t0, sum\nend\n\nlocal function bench_array(t)\n    local sum = 0\n    local t0 = SysTime()\n\n    for _ = 1, REPS do\n        for i = 1, #t do\n            sum = sum + t[i]\n        end\n    end\n\n    return SysTime() - t0, sum\nend\n\nlocal mapTime, mapSum = bench_map(map)\nlocal arrTime, arrSum = bench_array(arr)\n\nprint(\"map sum:\", mapSum, \"time:\", string.format(\"%.6f\", mapTime))\nprint(\"array sum:\", arrSum, \"time:\", string.format(\"%.6f\", arrTime))\nprint(\"faster:\", (arrTime < mapTime) and \"array\" or \"map\")\n```\nReason: A sequential number-indexed array is faster because numeric iteration (`for i = 1, #t`) hits the array part directly with contiguous storage and simple indexing, while string-keyed maps iterate hash entries with extra key hashing and lookup overhead.","model_patch":"```lua\nlocal SIZE = 20000\nlocal REPS = 2000\n\nlocal map = {}\nlocal arr = {}\nfor i = 1, SIZE do\n    map[\"k\" .. i] = i\n    arr[i] = i\nend\n\nlocal function bench_map(t)\n    local sum = 0\n    local t0 = SysTime()\n\n    for _ = 1, REPS do\n        for _, v in pairs(t) do\n            sum = sum + v\n        end\n    end\n\n    return SysTime() - t0, sum\nend\n\nlocal function bench_array(t)\n    local sum = 0\n    local t0 = SysTime()\n\n    for _ = 1, REPS do\n        for i = 1, #t do\n            sum = sum + t[i]\n        end\n    end\n\n    return SysTime() - t0, sum\nend\n\nlocal mapTime, mapSum = bench_map(map)\nlocal arrTime, arrSum = bench_array(arr)\n\nprint(\"map sum:\", mapSum, \"time:\", string.format(\"%.6f\", mapTime))\nprint(\"array sum:\", arrSum, \"time:\", string.format(\"%.6f\", arrTime))\nprint(\"faster:\", (arrTime < mapTime) and \"array\" or \"map\")\n```\nReason: A sequential number-indexed array is faster because numeric iteration (`for i = 1, #t`) hits the array part directly with contiguous storage and simple indexing, while string-keyed maps iterate hash entries with extra key hashing and lookup overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12656,"startedAt":"2026-07-11T07:39:08.480Z","completedAt":"2026-07-11T07:39:21.565Z","answerBytes":384,"answerChars":384,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11849,"completionTokens":1043,"totalTokens":12892,"reasoningTokens":897,"cachedTokens":0},"finalResponse":"```lua\nlocal SetDrawColor = surface.SetDrawColor\n\nlocal r, g, b, a = 220, 80, 20, 255\n\nfor i = 1, 1000 do\n    SetDrawColor(r, g, b, a) -- faster for hot path: raw numbers\n    surface.DrawRect(8, 8, 64, 24)\nend\n```\nReason: Use the numeric form `surface.SetDrawColor(r, g, b, a)` in hot loops to avoid allocating/decoding a Color object each frame and reduce per-call dispatch overhead.","model_patch":"```lua\nlocal SetDrawColor = surface.SetDrawColor\n\nlocal r, g, b, a = 220, 80, 20, 255\n\nfor i = 1, 1000 do\n    SetDrawColor(r, g, b, a) -- faster for hot path: raw numbers\n    surface.DrawRect(8, 8, 64, 24)\nend\n```\nReason: Use the numeric form `surface.SetDrawColor(r, g, b, a)` in hot loops to avoid allocating/decoding a Color object each frame and reduce per-call dispatch overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14252,"startedAt":"2026-07-11T07:39:08.564Z","completedAt":"2026-07-11T07:39:23.192Z","answerBytes":401,"answerChars":401,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11867,"completionTokens":811,"totalTokens":12678,"reasoningTokens":688,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamID = \"STEAM_0:1:12345\"\nlocal row = sql.QueryRow(\"SELECT cash FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\nif row then\n    print(row.cash)\nend\n```\nReason: SQLite via `sql.QueryRow` is typically lower latency on a single Garry's Mod server because it avoids network hops and connection pool overhead, so local in-process reads/writes are usually faster than remote MySQL.","model_patch":"```lua\nlocal steamID = \"STEAM_0:1:12345\"\nlocal row = sql.QueryRow(\"SELECT cash FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\nif row then\n    print(row.cash)\nend\n```\nReason: SQLite via `sql.QueryRow` is typically lower latency on a single Garry's Mod server because it avoids network hops and connection pool overhead, so local in-process reads/writes are usually faster than remote MySQL."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7445,"startedAt":"2026-07-11T07:39:08.672Z","completedAt":"2026-07-11T07:39:16.393Z","answerBytes":879,"answerChars":879,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":1870,"totalTokens":13714,"reasoningTokens":1605,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak keys, no manual full cleanup needed\n\nlocal Player = FindMetaTable(\"Player\")\n\nfunction Player:GetSteamIDCached()\n    local sid = steamIdCache[self]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = self:SteamID()\n    steamIdCache[self] = sid\n    return sid\nend\n\nhook.Add(\"PlayerAuthed\", \"cache_steamid\", function(ply, steamid)\n    steamIdCache[ply] = steamid\nend)\n\nhook.Add(\"PlayerDisconnected\", \"purge_steamid_cache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- Hot path\nlocal function MyHotPath(ply)\n    local sid = ply:GetSteamIDCached()\n    -- use sid repeatedly without extra SteamID() calls\nend\n```\nReason: Cache SteamID once per player in a weak-key table and invalidate on auth/disconnect so repeated hot-path lookups use cheap table reads instead of repeated native SteamID() calls.","model_patch":"```lua\nlocal steamIdCache = setmetatable({}, { __mode = \"k\" }) -- weak keys, no manual full cleanup needed\n\nlocal Player = FindMetaTable(\"Player\")\n\nfunction Player:GetSteamIDCached()\n    local sid = steamIdCache[self]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = self:SteamID()\n    steamIdCache[self] = sid\n    return sid\nend\n\nhook.Add(\"PlayerAuthed\", \"cache_steamid\", function(ply, steamid)\n    steamIdCache[ply] = steamid\nend)\n\nhook.Add(\"PlayerDisconnected\", \"purge_steamid_cache\", function(ply)\n    steamIdCache[ply] = nil\nend)\n\n-- Hot path\nlocal function MyHotPath(ply)\n    local sid = ply:GetSteamIDCached()\n    -- use sid repeatedly without extra SteamID() calls\nend\n```\nReason: Cache SteamID once per player in a weak-key table and invalidate on auth/disconnect so repeated hot-path lookups use cheap table reads instead of repeated native SteamID() calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":13219,"startedAt":"2026-07-11T07:39:08.752Z","completedAt":"2026-07-11T07:39:22.171Z","answerBytes":621,"answerChars":621,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11841,"completionTokens":1487,"totalTokens":13328,"reasoningTokens":1277,"cachedTokens":11520},"finalResponse":"```lua\n-- Build thousands of small pieces, as in Garry's Mod Lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece-\" .. i\nend\n\n-- Slower: repeated concatenation (O(n^2) with many reallocations)\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: collect in a table and concatenate once\nlocal buf = {}\nfor i = 1, #pieces do\n    buf[i] = pieces[i]\nend\nlocal fast = table.concat(buf, \"\")\n\nprint(#slow == #fast, #fast)\n```\nReason: In Lua/GLua, `table.concat` builds the final string in one pass with one allocation pattern, while repeated `..` repeatedly reallocates growing strings.","model_patch":"```lua\n-- Build thousands of small pieces, as in Garry's Mod Lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece-\" .. i\nend\n\n-- Slower: repeated concatenation (O(n^2) with many reallocations)\nlocal slow = \"\"\nfor i = 1, #pieces do\n    slow = slow .. pieces[i]\nend\n\n-- Faster: collect in a table and concatenate once\nlocal buf = {}\nfor i = 1, #pieces do\n    buf[i] = pieces[i]\nend\nlocal fast = table.concat(buf, \"\")\n\nprint(#slow == #fast, #fast)\n```\nReason: In Lua/GLua, `table.concat` builds the final string in one pass with one allocation pattern, while repeated `..` repeatedly reallocates growing strings."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":15013,"startedAt":"2026-07-11T07:39:09.163Z","completedAt":"2026-07-11T07:39:24.579Z","answerBytes":350,"answerChars":350,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":1235,"totalTokens":13082,"reasoningTokens":1115,"cachedTokens":11520},"finalResponse":"```lua\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nfor _, r in ipairs(rects) do\n    SetDrawColor(r.col)\n    DrawRect(r.x, r.y, r.w, r.h)\nend\n```\nReason: For solid non-rounded rectangles, `surface.DrawRect` is the direct primitive and avoids `draw.RoundedBox(0, ...)`'s rounded-box code path, so it is the faster call.","model_patch":"```lua\nlocal SetDrawColor = surface.SetDrawColor\nlocal DrawRect = surface.DrawRect\n\nfor _, r in ipairs(rects) do\n    SetDrawColor(r.col)\n    DrawRect(r.x, r.y, r.w, r.h)\nend\n```\nReason: For solid non-rounded rectangles, `surface.DrawRect` is the direct primitive and avoids `draw.RoundedBox(0, ...)`'s rounded-box code path, so it is the faster call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14421,"startedAt":"2026-07-11T07:39:09.534Z","completedAt":"2026-07-11T07:39:23.995Z","answerBytes":553,"answerChars":553,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":1643,"totalTokens":13489,"reasoningTokens":1475,"cachedTokens":11520},"finalResponse":"```lua\nlocal x, y = 20, 20\nlocal font = \"Trebuchet24\"\nlocal white = Color(255, 255, 255, 220)\nlocal status = \"Ready\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(white)\n    surface.SetTextPos(x, y)\n    surface.DrawText(status)\nend)\n```\nReason: surface.SetTextPos + surface.DrawText is the lightest path for single-line text in the same frame since draw.DrawText and SimpleTextOutlined add extra alignment/outline/argument processing overhead before they call the underlying surface text draw.","model_patch":"```lua\nlocal x, y = 20, 20\nlocal font = \"Trebuchet24\"\nlocal white = Color(255, 255, 255, 220)\nlocal status = \"Ready\"\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(white)\n    surface.SetTextPos(x, y)\n    surface.DrawText(status)\nend)\n```\nReason: surface.SetTextPos + surface.DrawText is the lightest path for single-line text in the same frame since draw.DrawText and SimpleTextOutlined add extra alignment/outline/argument processing overhead before they call the underlying surface text draw."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13229,"startedAt":"2026-07-11T07:39:10.745Z","completedAt":"2026-07-11T07:39:24.682Z","answerBytes":187,"answerChars":187,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":818,"totalTokens":12656,"reasoningTokens":743,"cachedTokens":11520},"finalResponse":"```lua\nlocal arr = {\"a\", \"b\", \"c\"}\nlocal n = #arr\n```\nReason: Use the `#` operator; for sequential array-like tables in Garry's Mod Lua it is the idiomatic way to get their element count.","model_patch":"```lua\nlocal arr = {\"a\", \"b\", \"c\"}\nlocal n = #arr\n```\nReason: Use the `#` operator; for sequential array-like tables in Garry's Mod Lua it is the idiomatic way to get their element count."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13974,"startedAt":"2026-07-11T07:39:12.184Z","completedAt":"2026-07-11T07:39:27.106Z","answerBytes":449,"answerChars":449,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":1908,"totalTokens":13753,"reasoningTokens":1781,"cachedTokens":0},"finalResponse":"```lua\n-- Fast path for frequent full clears of a large sequential table\nlocal function resetTable()\n    t = {}          -- generally faster: replaces the table in O(1)\n    -- table.Empty(t) -- slower: walks every element and sets it to nil\nend\n```\nReason: `t = {}` is generally faster for repeated clears because it discards the old table reference immediately (`O(1)`), while `table.Empty(t)` is an in-place `O(n)` loop that touches every element.","model_patch":"```lua\n-- Fast path for frequent full clears of a large sequential table\nlocal function resetTable()\n    t = {}          -- generally faster: replaces the table in O(1)\n    -- table.Empty(t) -- slower: walks every element and sets it to nil\nend\n```\nReason: `t = {}` is generally faster for repeated clears because it discards the old table reference immediately (`O(1)`), while `table.Empty(t)` is an in-place `O(n)` loop that touches every element."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12051,"startedAt":"2026-07-11T07:39:12.389Z","completedAt":"2026-07-11T07:39:25.187Z","answerBytes":669,"answerChars":669,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":849,"totalTokens":12692,"reasoningTokens":627,"cachedTokens":11520},"finalResponse":"```lua\n-- Fast membership checks in GMod Lua: use a set (table keyed by value) instead of table.HasValue.\nlocal roleList = {\"admin\", \"mod\", \"vip\"}\n\n-- Build once (could be done at init/load time)\nlocal roleSet = {}\nfor _, role in ipairs(roleList) do\n    roleSet[role] = true\nend\n\n-- Fast path\nlocal function hasRole(set, role)\n    return set[role] == true\nend\n\n-- Slow path (for comparison):\n-- local ok = table.HasValue(roleList, role) -- scans whole list O(n)\n\nlocal plyRole = \"mod\"\nif hasRole(roleSet, plyRole) then\n    print(\"role is allowed\")\nend\n```\nReason: A keyed set gives O(1) hash lookups, while table.HasValue on a list is a linear O(n) scan on every check.","model_patch":"```lua\n-- Fast membership checks in GMod Lua: use a set (table keyed by value) instead of table.HasValue.\nlocal roleList = {\"admin\", \"mod\", \"vip\"}\n\n-- Build once (could be done at init/load time)\nlocal roleSet = {}\nfor _, role in ipairs(roleList) do\n    roleSet[role] = true\nend\n\n-- Fast path\nlocal function hasRole(set, role)\n    return set[role] == true\nend\n\n-- Slow path (for comparison):\n-- local ok = table.HasValue(roleList, role) -- scans whole list O(n)\n\nlocal plyRole = \"mod\"\nif hasRole(roleSet, plyRole) then\n    print(\"role is allowed\")\nend\n```\nReason: A keyed set gives O(1) hash lookups, while table.HasValue on a list is a linear O(n) scan on every check."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12024,"startedAt":"2026-07-11T07:39:12.590Z","completedAt":"2026-07-11T07:39:25.177Z","answerBytes":278,"answerChars":278,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":604,"totalTokens":12448,"reasoningTokens":521,"cachedTokens":11520},"finalResponse":"```lua\nlocal t = { health = 100, name = \"npc\", active = true }\n```\nReason: For small, fixed-shape tables in Garry's Mod Lua, the constructor form is faster because it builds the table with known fields in one creation path, avoiding separate post-creation assignment operations.","model_patch":"```lua\nlocal t = { health = 100, name = \"npc\", active = true }\n```\nReason: For small, fixed-shape tables in Garry's Mod Lua, the constructor form is faster because it builds the table with known fields in one creation path, avoiding separate post-creation assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7938,"startedAt":"2026-07-11T07:39:12.779Z","completedAt":"2026-07-11T07:39:21.154Z","answerBytes":413,"answerChars":413,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11838,"completionTokens":720,"totalTokens":12558,"reasoningTokens":587,"cachedTokens":11520},"finalResponse":"```lua\nlocal function RandomFromArray(arr)\n    local n = #arr\n    return n > 0 and arr[math.random(n)] or nil\nend\n\nlocal names = {\"Gman\", \"Alyx\", \"Barney\", \"Gordon\"}\nlocal pick = RandomFromArray(names)\n```\nReason: For a sequential (array-like) table, `table.Random` does extra generic table/key handling, while `arr[math.random(#arr)]` does one bounds lookup with direct numeric indexing and avoids that overhead.","model_patch":"```lua\nlocal function RandomFromArray(arr)\n    local n = #arr\n    return n > 0 and arr[math.random(n)] or nil\nend\n\nlocal names = {\"Gman\", \"Alyx\", \"Barney\", \"Gordon\"}\nlocal pick = RandomFromArray(names)\n```\nReason: For a sequential (array-like) table, `table.Random` does extra generic table/key handling, while `arr[math.random(#arr)]` does one bounds lookup with direct numeric indexing and avoids that overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17127,"startedAt":"2026-07-11T07:39:12.967Z","completedAt":"2026-07-11T07:39:30.335Z","answerBytes":227,"answerChars":227,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11837,"completionTokens":614,"totalTokens":12451,"reasoningTokens":532,"cachedTokens":11520},"finalResponse":"```lua\nfor i = 1, iterations do\n    local sq = x * x\n    -- use sq\nend\n```\nReason: `x * x` is the fastest way to square in Lua; it uses a single multiply opcode versus exponentiation `^`, which is slower and has extra overhead.","model_patch":"```lua\nfor i = 1, iterations do\n    local sq = x * x\n    -- use sq\nend\n```\nReason: `x * x` is the fastest way to square in Lua; it uses a single multiply opcode versus exponentiation `^`, which is slower and has extra overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.3-codex-spark@high","model_name_or_path":"gpt-5.3-codex-spark@high","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":5182,"startedAt":"2026-07-11T07:39:12.994Z","completedAt":"2026-07-11T07:39:18.401Z","answerBytes":246,"answerChars":246,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":448,"totalTokens":12299,"reasoningTokens":368,"cachedTokens":11520},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- visit each connected player\n    -- process ply here\nend\n```\nReason: `player.GetAll()` in Garry's Mod returns the list of currently connected players, and `ipairs` cleanly iterates that array.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- visit each connected player\n    -- process ply here\nend\n```\nReason: `player.GetAll()` in Garry's Mod returns the list of currently connected players, and `ipairs` cleanly iterates that array."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"3990c92253db85bb","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17919,"startedAt":"2026-07-11T07:39:13.150Z","completedAt":"2026-07-11T07:39:31.370Z","answerBytes":331,"answerChars":331,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":3548,"totalTokens":15392,"reasoningTokens":3448,"cachedTokens":0},"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if IsValid(ent) then\n        -- visit ent here\n    end\nend\n```\nReason: `ents.FindByClass(\"prop_physics\")` filters on class before returning results, so you only iterate matching entities instead of first collecting all entities in the map with a full-table pass.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    if IsValid(ent) then\n        -- visit ent here\n    end\nend\n```\nReason: `ents.FindByClass(\"prop_physics\")` filters on class before returning results, so you only iterate matching entities instead of first collecting all entities in the map with a full-table pass."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"12d2222fdb7d6b90","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":11832,"startedAt":"2026-07-11T07:39:14.870Z","completedAt":"2026-07-11T07:39:26.944Z","answerBytes":247,"answerChars":247,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":1006,"totalTokens":12854,"reasoningTokens":916,"cachedTokens":0},"finalResponse":"```lua\nMyAddon = MyAddon or {}\n\nfunction MyAddon.Think()\n    -- minimal callback body\nend\n\nhook.Add(\"Think\", \"MyAddon.Think\", MyAddon.Think)\n```\nReason: Register `MyAddon.Think` with `hook.Add` so the `Think` event calls that callback every frame.","model_patch":"```lua\nMyAddon = MyAddon or {}\n\nfunction MyAddon.Think()\n    -- minimal callback body\nend\n\nhook.Add(\"Think\", \"MyAddon.Think\", MyAddon.Think)\n```\nReason: Register `MyAddon.Think` with `hook.Add` so the `Think` event calls that callback every frame."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"35527312e59dfc13","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":10777,"startedAt":"2026-07-11T07:39:16.595Z","completedAt":"2026-07-11T07:39:27.556Z","answerBytes":198,"answerChars":198,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":637,"totalTokens":12482,"reasoningTokens":565,"cachedTokens":0},"finalResponse":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: Use `IsValid(ent)` as the canonical Garry's Mod guard; it safely rejects `nil`, `NULL`, and removed entities before any method call.","model_patch":"```lua\nif IsValid(ent) then\n    ent:DoSomething()\nend\n```\nReason: Use `IsValid(ent)` as the canonical Garry's Mod guard; it safely rejects `nil`, `NULL`, and removed entities before any method call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"24d54ee8366753a6","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12461,"startedAt":"2026-07-11T07:39:18.430Z","completedAt":"2026-07-11T07:39:30.960Z","answerBytes":521,"answerChars":521,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11836,"completionTokens":1440,"totalTokens":13276,"reasoningTokens":1294,"cachedTokens":11520},"finalResponse":"```lua\n-- Server: register message and handler\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\n\n    net.Receive(\"MyAddon.Sync\", function(len, ply)\n        local payload = net.ReadString() -- or net.ReadTable()/ReadUInt/etc depending on payload type\n        print(\"Got MyAddon.Sync from\", ply:Nick(), payload)\n    end)\nend\n```\nReason: `net.Receive` binds a callback to the incoming `MyAddon.Sync` network message, and `util.AddNetworkString` on the server makes that message name valid for client->server sending.","model_patch":"```lua\n-- Server: register message and handler\nif SERVER then\n    util.AddNetworkString(\"MyAddon.Sync\")\n\n    net.Receive(\"MyAddon.Sync\", function(len, ply)\n        local payload = net.ReadString() -- or net.ReadTable()/ReadUInt/etc depending on payload type\n        print(\"Got MyAddon.Sync from\", ply:Nick(), payload)\n    end)\nend\n```\nReason: `net.Receive` binds a callback to the incoming `MyAddon.Sync` network message, and `util.AddNetworkString` on the server makes that message name valid for client->server sending."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f6bc97bf98280d62","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12917,"startedAt":"2026-07-11T07:39:18.977Z","completedAt":"2026-07-11T07:39:31.896Z","answerBytes":550,"answerChars":550,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":3484,"totalTokens":15330,"reasoningTokens":3285,"cachedTokens":0},"finalResponse":"```lua\nlocal ZERO_ANGLE_POOL = {}\nfor i = 1, 16 do\n    ZERO_ANGLE_POOL[i] = Angle(0, 0, 0)\nend\n\nlocal zero_idx = 0\nlocal function freshZeroAngle()\n    zero_idx = zero_idx + 1\n    if zero_idx > #ZERO_ANGLE_POOL then\n        zero_idx = 1\n    end\n\n    local a = ZERO_ANGLE_POOL[zero_idx]\n    a.p, a.y, a.r = 0, 0, 0\n    return a\nend\n\n-- hot path:\n-- local ang = freshZeroAngle()  -- reuse+clear, no Angle() allocation\n```\nReason: Reusing a small Angle pool and clearing fields in-place avoids per-call Angle() allocations and GC churn in hot code paths.","model_patch":"```lua\nlocal ZERO_ANGLE_POOL = {}\nfor i = 1, 16 do\n    ZERO_ANGLE_POOL[i] = Angle(0, 0, 0)\nend\n\nlocal zero_idx = 0\nlocal function freshZeroAngle()\n    zero_idx = zero_idx + 1\n    if zero_idx > #ZERO_ANGLE_POOL then\n        zero_idx = 1\n    end\n\n    local a = ZERO_ANGLE_POOL[zero_idx]\n    a.p, a.y, a.r = 0, 0, 0\n    return a\nend\n\n-- hot path:\n-- local ang = freshZeroAngle()  -- reuse+clear, no Angle() allocation\n```\nReason: Reusing a small Angle pool and clearing fields in-place avoids per-call Angle() allocations and GC churn in hot code paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"bcc4ff8eb162b699","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11465,"startedAt":"2026-07-11T07:39:19.622Z","completedAt":"2026-07-11T07:39:31.102Z","answerBytes":273,"answerChars":273,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":762,"totalTokens":12613,"reasoningTokens":678,"cachedTokens":11520},"finalResponse":"```lua\nlocal ADDON_COLOR = myaddon.config.color\n\nlocal color = ADDON_COLOR\n```\nReason: A flat local (`ADDON_COLOR`) is fastest for hot reads because local variable access is direct, while globals go through `_G` and `myaddon.config.color` adds extra table lookups per read.","model_patch":"```lua\nlocal ADDON_COLOR = myaddon.config.color\n\nlocal color = ADDON_COLOR\n```\nReason: A flat local (`ADDON_COLOR`) is fastest for hot reads because local variable access is direct, while globals go through `_G` and `myaddon.config.color` adds extra table lookups per read."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"02a37daa699cded3","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12013,"startedAt":"2026-07-11T07:39:19.755Z","completedAt":"2026-07-11T07:39:31.795Z","answerBytes":268,"answerChars":268,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":2160,"totalTokens":14005,"reasoningTokens":2067,"cachedTokens":0},"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: `ply:GetDarkRPVar(\"job\")` is the DarkRP API for this data, so it stays in sync with DarkRP internals, unlike legacy `GetNWString(\"job\")` which is a lower-level NW var access that can bypass DarkRP conventions.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: `ply:GetDarkRPVar(\"job\")` is the DarkRP API for this data, so it stays in sync with DarkRP internals, unlike legacy `GetNWString(\"job\")` which is a lower-level NW var access that can bypass DarkRP conventions."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a5772470c6859cdc","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4058,"startedAt":"2026-07-11T07:39:20.379Z","completedAt":"2026-07-11T07:39:24.581Z","answerBytes":315,"answerChars":315,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":562,"totalTokens":12406,"reasoningTokens":446,"cachedTokens":0},"finalResponse":"```lua\nlocal a = Vector(0, 0, 0)\nlocal b = Vector(64, 0, 0)\nlocal maxDist = 128\n\nif a:DistToSqr(b) < maxDist * maxDist then\n    -- close enough\nend\n```\nReason: Use Vector:DistToSqr(other), which compares squared distance directly and avoids the expensive sqrt needed by DistTo (or Length) for threshold-only checks.","model_patch":"```lua\nlocal a = Vector(0, 0, 0)\nlocal b = Vector(64, 0, 0)\nlocal maxDist = 128\n\nif a:DistToSqr(b) < maxDist * maxDist then\n    -- close enough\nend\n```\nReason: Use Vector:DistToSqr(other), which compares squared distance directly and avoids the expensive sqrt needed by DistTo (or Length) for threshold-only checks."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"306d3f1d05f28246","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 1 through 1 candidate loops.","durationMs":14593,"startedAt":"2026-07-11T07:39:20.460Z","completedAt":"2026-07-11T07:39:35.131Z","answerBytes":468,"answerChars":466,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11840,"completionTokens":3346,"totalTokens":15186,"reasoningTokens":3213,"cachedTokens":0},"finalResponse":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- visit ent\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        if IsValid(ent) then\n            -- visit ent\n        end\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended no-allocation way to enumerate every entity, so it’s used first, with `ents.GetAll()` as a compatibility fallback when that iterator isn't available.","model_patch":"```lua\nif ents.Iterator then\n    for ent in ents.Iterator() do\n        if IsValid(ent) then\n            -- visit ent\n        end\n    end\nelse\n    for _, ent in ipairs(ents.GetAll()) do\n        if IsValid(ent) then\n            -- visit ent\n        end\n    end\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended no-allocation way to enumerate every entity, so it’s used first, with `ents.GetAll()` as a compatibility fallback when that iterator isn't available."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"07c583fc3d9fe09f","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12632,"startedAt":"2026-07-11T07:39:20.863Z","completedAt":"2026-07-11T07:39:33.595Z","answerBytes":625,"answerChars":625,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11863,"completionTokens":3327,"totalTokens":15190,"reasoningTokens":3145,"cachedTokens":0},"finalResponse":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local origin = ply:GetPos()\n    local half = Vector(radius, radius, radius)\n    local radiusSqr = radius * radius\n\n    local nearby = {}\n    for _, ent in ipairs(ents.FindInBox(origin - half, origin + half)) do\n        if ent ~= ply and ent:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is a faster built-in broad-phase spatial query in common GMod benchmarks for nearby checks, and the final squared-distance filter keeps it exact without using `FindInPVS`. ","model_patch":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local origin = ply:GetPos()\n    local half = Vector(radius, radius, radius)\n    local radiusSqr = radius * radius\n\n    local nearby = {}\n    for _, ent in ipairs(ents.FindInBox(origin - half, origin + half)) do\n        if ent ~= ply and ent:GetPos():DistToSqr(origin) <= radiusSqr then\n            nearby[#nearby + 1] = ent\n        end\n    end\n\n    return nearby\nend\n```\nReason: `ents.FindInBox` is a faster built-in broad-phase spatial query in common GMod benchmarks for nearby checks, and the final squared-distance filter keeps it exact without using `FindInPVS`. "}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d139ba2e8ee38a2f","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":22298,"startedAt":"2026-07-11T07:39:20.985Z","completedAt":"2026-07-11T07:39:43.313Z","answerBytes":912,"answerChars":912,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11855,"completionTokens":2221,"totalTokens":14076,"reasoningTokens":1956,"cachedTokens":11520},"finalResponse":"```lua\nlocal function playersWithinRadius(center, radius)\n    local radiusSq = radius * radius\n    local cx, cy, cz = center.x, center.y, center.z\n    local nearby = {}\n    local players = player.GetAll() -- connected players only (or player.GetHumans())\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            local p = ply:GetPos()\n            local dx = p.x - cx\n            local dy = p.y - cy\n            local dz = p.z - cz\n\n            if dx * dx + dy * dy + dz * dz <= radiusSq then\n                nearby[#nearby + 1] = ply\n            end\n        end\n    end\n\n    return nearby\nend\n\n-- usage\nlocal near = playersWithinRadius(Vector(0, 0, 0), 500)\n```\nReason: `ents.FindInSphere` is O(all entities), then filtering adds overhead, while this is O(players) and avoids `sqrt` by comparing squared distances so it stays cheap when only player proximity is needed.","model_patch":"```lua\nlocal function playersWithinRadius(center, radius)\n    local radiusSq = radius * radius\n    local cx, cy, cz = center.x, center.y, center.z\n    local nearby = {}\n    local players = player.GetAll() -- connected players only (or player.GetHumans())\n\n    for i = 1, #players do\n        local ply = players[i]\n        if IsValid(ply) then\n            local p = ply:GetPos()\n            local dx = p.x - cx\n            local dy = p.y - cy\n            local dz = p.z - cz\n\n            if dx * dx + dy * dy + dz * dz <= radiusSq then\n                nearby[#nearby + 1] = ply\n            end\n        end\n    end\n\n    return nearby\nend\n\n-- usage\nlocal near = playersWithinRadius(Vector(0, 0, 0), 500)\n```\nReason: `ents.FindInSphere` is O(all entities), then filtering adds overhead, while this is O(players) and avoids `sqrt` by comparing squared distances so it stays cheap when only player proximity is needed."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b3401a190a8aecf0","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11273,"startedAt":"2026-07-11T07:39:21.168Z","completedAt":"2026-07-11T07:39:32.479Z","answerBytes":322,"answerChars":322,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11852,"completionTokens":742,"totalTokens":12594,"reasoningTokens":635,"cachedTokens":11520},"finalResponse":"```lua\nlocal n = 1000000\nlocal total = 0\n\nfor i = 1, n do\n    total = total + 1\nend\n```\nReason: Use a numeric `for` loop for a tight counter loop, because Garry's Mod Lua handles the bounds/step in the loop machinery, which is generally lower-overhead than manually incrementing and checking in an equivalent `while` loop.","model_patch":"```lua\nlocal n = 1000000\nlocal total = 0\n\nfor i = 1, n do\n    total = total + 1\nend\n```\nReason: Use a numeric `for` loop for a tight counter loop, because Garry's Mod Lua handles the bounds/step in the loop machinery, which is generally lower-overhead than manually incrementing and checking in an equivalent `while` loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ed1d3e09249fc8bb","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11611,"startedAt":"2026-07-11T07:39:21.427Z","completedAt":"2026-07-11T07:39:33.121Z","answerBytes":881,"answerChars":881,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11858,"completionTokens":1225,"totalTokens":13083,"reasoningTokens":972,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster: one hook dispatch per tick, iterate players once inside the hook.\nlocal TICK_HOOK = \"MyAddon_PlayerTick\"\n\nlocal function DispatchPlayerTick()\n    local players = player.GetAll()\n    hook.Run(TICK_HOOK, players, FrameTime())\nend\nhook.Add(\"Think\", \"MyAddon_DispatchPlayerTick\", DispatchPlayerTick)\n\nhook.Add(TICK_HOOK, \"MyAddon_PlayerLogic\", function(players, dt)\n    for _, ply in ipairs(players) do\n        if not IsValid(ply) then\n            continue\n        end\n\n        -- custom per-player logic here\n    end\nend)\n\n-- Slower alternative (N hook.Run calls):\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(TICK_HOOK, ply, FrameTime())\n-- end\n```\nReason: One `hook.Run` per tick avoids repeated hook lookup/dispatch overhead and reduces call overhead from O(N) `hook.Run` calls to O(N) logic inside a single callback where work is already required.","model_patch":"```lua\n-- Faster: one hook dispatch per tick, iterate players once inside the hook.\nlocal TICK_HOOK = \"MyAddon_PlayerTick\"\n\nlocal function DispatchPlayerTick()\n    local players = player.GetAll()\n    hook.Run(TICK_HOOK, players, FrameTime())\nend\nhook.Add(\"Think\", \"MyAddon_DispatchPlayerTick\", DispatchPlayerTick)\n\nhook.Add(TICK_HOOK, \"MyAddon_PlayerLogic\", function(players, dt)\n    for _, ply in ipairs(players) do\n        if not IsValid(ply) then\n            continue\n        end\n\n        -- custom per-player logic here\n    end\nend)\n\n-- Slower alternative (N hook.Run calls):\n-- for _, ply in ipairs(player.GetAll()) do\n--     hook.Run(TICK_HOOK, ply, FrameTime())\n-- end\n```\nReason: One `hook.Run` per tick avoids repeated hook lookup/dispatch overhead and reduces call overhead from O(N) `hook.Run` calls to O(N) logic inside a single callback where work is already required."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3def450f3158ceff","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12430,"startedAt":"2026-07-11T07:39:21.618Z","completedAt":"2026-07-11T07:39:34.308Z","answerBytes":630,"answerChars":630,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11853,"completionTokens":2112,"totalTokens":13965,"reasoningTokens":1877,"cachedTokens":0},"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local x, y = 16, 16\n\n    draw.RoundedBox(0, x, y, 180, 50, Color(0, 0, 0, 150))\n    draw.RoundedBox(0, x + 4, y + 26, math.max(0, hp), 16, Color(220, 30, 30, 220))\n    draw.SimpleText(\"HP: \" .. hp, \"DermaLarge\", x + 90, y + 14, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)\nend)\n```\nReason: Cache `LocalPlayer()` and the `Health()` result in locals once per frame, then reuse that value in all three draw calls instead of calling `LocalPlayer():Health()` repeatedly.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastHealthHUD\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n    local x, y = 16, 16\n\n    draw.RoundedBox(0, x, y, 180, 50, Color(0, 0, 0, 150))\n    draw.RoundedBox(0, x + 4, y + 26, math.max(0, hp), 16, Color(220, 30, 30, 220))\n    draw.SimpleText(\"HP: \" .. hp, \"DermaLarge\", x + 90, y + 14, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)\nend)\n```\nReason: Cache `LocalPlayer()` and the `Health()` result in locals once per frame, then reuse that value in all three draw calls instead of calling `LocalPlayer():Health()` repeatedly."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"16a7bed1b931d467","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12821,"startedAt":"2026-07-11T07:39:22.173Z","completedAt":"2026-07-11T07:39:34.996Z","answerBytes":457,"answerChars":457,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1680,"totalTokens":13523,"reasoningTokens":1516,"cachedTokens":11520},"finalResponse":"```lua\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaint\", function()\n    surface.SetDrawColor(WHITE) -- set once, reused for all draws\n\n    for i = 1, 200 do\n        local x = (i - 1) * 8\n        surface.DrawRect(x, 8, 6, 6)\n    end\nend)\n```\nReason: `Color(255,255,255)` is created each iteration today, so cache the `Color` once and move `SetDrawColor` out of the inner loop to remove repeated allocations and reduce per-item calls.","model_patch":"```lua\nlocal WHITE = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastPaint\", function()\n    surface.SetDrawColor(WHITE) -- set once, reused for all draws\n\n    for i = 1, 200 do\n        local x = (i - 1) * 8\n        surface.DrawRect(x, 8, 6, 6)\n    end\nend)\n```\nReason: `Color(255,255,255)` is created each iteration today, so cache the `Color` once and move `SetDrawColor` out of the inner loop to remove repeated allocations and reduce per-item calls."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"c116d8c651190647","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11030,"startedAt":"2026-07-11T07:39:22.754Z","completedAt":"2026-07-11T07:39:33.997Z","answerBytes":297,"answerChars":297,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":585,"totalTokens":12428,"reasoningTokens":478,"cachedTokens":11520},"finalResponse":"```lua\nlocal sin = math.sin  -- cache function once, outside the hot path\n\nlocal sum = 0\nfor i = 1, 100000 do\n    local a = i * 0.01\n    sum = sum + sin(a)\nend\n```\nReason: Caching `math.sin` in a local (`sin`) avoids repeated global table lookup and method resolution each iteration in a hot loop.","model_patch":"```lua\nlocal sin = math.sin  -- cache function once, outside the hot path\n\nlocal sum = 0\nfor i = 1, 100000 do\n    local a = i * 0.01\n    sum = sum + sin(a)\nend\n```\nReason: Caching `math.sin` in a local (`sin`) avoids repeated global table lookup and method resolution each iteration in a hot loop."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"7398105af47b079e","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13824,"startedAt":"2026-07-11T07:39:23.212Z","completedAt":"2026-07-11T07:39:37.089Z","answerBytes":743,"answerChars":743,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":2073,"totalTokens":13919,"reasoningTokens":1868,"cachedTokens":11520},"finalResponse":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n    return cachedLocalPlayer\nend\n\nhook.Add(\"Think\", \"MyAddon_FastLocalPlayerLoop\", function()\n    local lp = GetLocalPlayer()\n    if not IsValid(lp) then return end\n\n    -- use lp repeatedly here without calling LocalPlayer() again\n    lp:SetEyeAngles(lp:EyeAngles())\nend)\n\nhook.Add(\"ShutDown\", \"MyAddon_ClearLocalPlayerCache\", function()\n    cachedLocalPlayer = nil\nend)\n```\nReason: Cache the client player in a local variable and only refresh it when it becomes invalid, so high-frequency code reads `cachedLocalPlayer` instead of performing a global `LocalPlayer()` lookup each call.","model_patch":"```lua\nlocal cachedLocalPlayer\n\nlocal function GetLocalPlayer()\n    if not IsValid(cachedLocalPlayer) then\n        cachedLocalPlayer = LocalPlayer()\n    end\n    return cachedLocalPlayer\nend\n\nhook.Add(\"Think\", \"MyAddon_FastLocalPlayerLoop\", function()\n    local lp = GetLocalPlayer()\n    if not IsValid(lp) then return end\n\n    -- use lp repeatedly here without calling LocalPlayer() again\n    lp:SetEyeAngles(lp:EyeAngles())\nend)\n\nhook.Add(\"ShutDown\", \"MyAddon_ClearLocalPlayerCache\", function()\n    cachedLocalPlayer = nil\nend)\n```\nReason: Cache the client player in a local variable and only refresh it when it becomes invalid, so high-frequency code reads `cachedLocalPlayer` instead of performing a global `LocalPlayer()` lookup each call."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"20b22f678a4b08d7","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12418,"startedAt":"2026-07-11T07:39:23.215Z","completedAt":"2026-07-11T07:39:35.691Z","answerBytes":682,"answerChars":677,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11860,"completionTokens":2584,"totalTokens":14444,"reasoningTokens":2358,"cachedTokens":11520},"finalResponse":"```lua\nlocal COS_FACING = math.cos(math.rad(22.5)) -- ~22.5° cone\n\nlocal function ArePlayersLookingAtEachOther(plyA, plyB)\n    if not IsValid(plyA) or not IsValid(plyB) then\n        return false\n    end\n\n    local dirAtoB = plyB:EyePos() - plyA:EyePos()\n    if dirAtoB:LengthSqr() == 0 then\n        return false\n    end\n\n    dirAtoB:Normalize() -- one normalization only\n\n    return plyA:GetAimVector():Dot(dirAtoB) >= COS_FACING\n        and plyB:GetAimVector():Dot(-dirAtoB) >= COS_FACING\nend\n```\nReason: Dot product gives cosine of the angle to the target direction, so using precomputed `cos(theta)` thresholds checks “roughly facing” without expensive `acos` or angle math.","model_patch":"```lua\nlocal COS_FACING = math.cos(math.rad(22.5)) -- ~22.5° cone\n\nlocal function ArePlayersLookingAtEachOther(plyA, plyB)\n    if not IsValid(plyA) or not IsValid(plyB) then\n        return false\n    end\n\n    local dirAtoB = plyB:EyePos() - plyA:EyePos()\n    if dirAtoB:LengthSqr() == 0 then\n        return false\n    end\n\n    dirAtoB:Normalize() -- one normalization only\n\n    return plyA:GetAimVector():Dot(dirAtoB) >= COS_FACING\n        and plyB:GetAimVector():Dot(-dirAtoB) >= COS_FACING\nend\n```\nReason: Dot product gives cosine of the angle to the target direction, so using precomputed `cos(theta)` thresholds checks “roughly facing” without expensive `acos` or angle math."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"de332f7356830dfa","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11938,"startedAt":"2026-07-11T07:39:23.525Z","completedAt":"2026-07-11T07:39:35.618Z","answerBytes":313,"answerChars":313,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11852,"completionTokens":1265,"totalTokens":13117,"reasoningTokens":1172,"cachedTokens":11520},"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: `:` is just sugar for `obj:method(...)` -> `obj.method(obj, ...)`, so for your own helper that just takes a player parameter, explicit `SomeHelper(ply)` is typically the clearer and slightly faster option (one direct lookup) unless you need a true method attached to the object.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: `:` is just sugar for `obj:method(...)` -> `obj.method(obj, ...)`, so for your own helper that just takes a player parameter, explicit `SomeHelper(ply)` is typically the clearer and slightly faster option (one direct lookup) unless you need a true method attached to the object."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"6cbb4e4b2f19dd24","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12789,"startedAt":"2026-07-11T07:39:23.544Z","completedAt":"2026-07-11T07:39:36.577Z","answerBytes":429,"answerChars":429,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1655,"totalTokens":13498,"reasoningTokens":1513,"cachedTokens":11520},"finalResponse":"```lua\nlocal DEBUG = true\nlocal TAG = \"[DBG] \"\n\nlocal function hotDebug(frame, hp)\n    if not DEBUG then return end\n    MsgN(TAG, \"frame=\", frame, \" hp=\", hp)\nend\n\n-- called from hot path\nhotDebug(CurTime(), player:Health())\n```\nReason: `MsgN` is a faster console writer in Garry's Mod than `print`, because `print` does extra formatting/spacing work and `MsgN` writes directly to the console with variadic output plus a newline.","model_patch":"```lua\nlocal DEBUG = true\nlocal TAG = \"[DBG] \"\n\nlocal function hotDebug(frame, hp)\n    if not DEBUG then return end\n    MsgN(TAG, \"frame=\", frame, \" hp=\", hp)\nend\n\n-- called from hot path\nhotDebug(CurTime(), player:Health())\n```\nReason: `MsgN` is a faster console writer in Garry's Mod than `print`, because `print` does extra formatting/spacing work and `MsgN` writes directly to the console with variadic output plus a newline."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"de5e4875fcf3e600","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12865,"startedAt":"2026-07-11T07:39:23.680Z","completedAt":"2026-07-11T07:39:36.738Z","answerBytes":328,"answerChars":328,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":749,"totalTokens":12600,"reasoningTokens":641,"cachedTokens":11520},"finalResponse":"```lua\nlocal n = #arr\nfor i = 1, n do\n    local v = arr[i]\n    -- use v\nend\n```\nReason: Numeric `for` over `1..#arr` is the fastest for dense array-like tables in Lua because it does direct integer indexing in a compiled loop with a single length check, while `ipairs`/`pairs` use iterator machinery and extra dispatch overhead.","model_patch":"```lua\nlocal n = #arr\nfor i = 1, n do\n    local v = arr[i]\n    -- use v\nend\n```\nReason: Numeric `for` over `1..#arr` is the fastest for dense array-like tables in Lua because it does direct integer indexing in a compiled loop with a single length check, while `ipairs`/`pairs` use iterator machinery and extra dispatch overhead."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"ead0a98b3ff6a388","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13587,"startedAt":"2026-07-11T07:39:23.873Z","completedAt":"2026-07-11T07:39:37.733Z","answerBytes":770,"answerChars":770,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11865,"completionTokens":3218,"totalTokens":15083,"reasoningTokens":2994,"cachedTokens":11520},"finalResponse":"```lua\nlocal TEAM_POLICE = TEAM_POLICE\n\nlocal function policeNamesWithMoney(minSalary)\n    local players = player.GetAll()\n    local out = {}\n    local outN = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if ply:Alive() and ply:Team() == TEAM_POLICE then\n            local salary = ply:getDarkRPVar(\"salary\") or 0\n            if salary > minSalary then\n                outN = outN + 1\n                out[outN] = ply:Nick()\n            end\n        end\n    end\n\n    return out\nend\n\nlocal names = policeNamesWithMoney(500)\n```\nReason: This is a single pass filter/map loop (alive + team + salary filter, then map to `Nick()`), which is faster than `fn` pipelines because it avoids nested iterator/combinator calls and intermediate tables per stage.","model_patch":"```lua\nlocal TEAM_POLICE = TEAM_POLICE\n\nlocal function policeNamesWithMoney(minSalary)\n    local players = player.GetAll()\n    local out = {}\n    local outN = 0\n\n    for i = 1, #players do\n        local ply = players[i]\n\n        if ply:Alive() and ply:Team() == TEAM_POLICE then\n            local salary = ply:getDarkRPVar(\"salary\") or 0\n            if salary > minSalary then\n                outN = outN + 1\n                out[outN] = ply:Nick()\n            end\n        end\n    end\n\n    return out\nend\n\nlocal names = policeNamesWithMoney(500)\n```\nReason: This is a single pass filter/map loop (alive + team + salary filter, then map to `Nick()`), which is faster than `fn` pipelines because it avoids nested iterator/combinator calls and intermediate tables per stage."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"a834817afe9e6c25","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13603,"startedAt":"2026-07-11T07:39:24.058Z","completedAt":"2026-07-11T07:39:37.824Z","answerBytes":1310,"answerChars":1310,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11860,"completionTokens":3155,"totalTokens":15015,"reasoningTokens":2760,"cachedTokens":11520},"finalResponse":"```lua\nlocal cachedPlayers = {}\nlocal playerSlotByEnt = {}\n\nlocal function cachePlayerAdd(ply)\n    local ent = ply:EntIndex()\n    if playerSlotByEnt[ent] then return end\n\n    local slot = #cachedPlayers + 1\n    cachedPlayers[slot] = ply\n    playerSlotByEnt[ent] = slot\nend\n\nlocal function cachePlayerRemove(ply)\n    local ent = ply:EntIndex()\n    local slot = playerSlotByEnt[ent]\n    if not slot then return end\n\n    local lastSlot = #cachedPlayers\n    local lastPly = cachedPlayers[lastSlot]\n\n    cachedPlayers[slot] = lastPly\n    playerSlotByEnt[lastPly:EntIndex()] = slot\n\n    cachedPlayers[lastSlot] = nil\n    playerSlotByEnt[ent] = nil\nend\n\nhook.Add(\"Initialize\", \"PlayerCache_Init\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        cachePlayerAdd(ply)\n    end\nend)\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", function(ply)\n    cachePlayerAdd(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", function(ply)\n    cachePlayerRemove(ply)\nend)\n\nhook.Add(\"Think\", \"PlayerTick_CachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        -- per-tick work using cached player list\n    end\nend)\n```\nReason: This replaces per-tick `player.GetAll()` scans with O(1)-update cache maintenance on join/leave hooks, so the tick loop only iterates a maintained table.","model_patch":"```lua\nlocal cachedPlayers = {}\nlocal playerSlotByEnt = {}\n\nlocal function cachePlayerAdd(ply)\n    local ent = ply:EntIndex()\n    if playerSlotByEnt[ent] then return end\n\n    local slot = #cachedPlayers + 1\n    cachedPlayers[slot] = ply\n    playerSlotByEnt[ent] = slot\nend\n\nlocal function cachePlayerRemove(ply)\n    local ent = ply:EntIndex()\n    local slot = playerSlotByEnt[ent]\n    if not slot then return end\n\n    local lastSlot = #cachedPlayers\n    local lastPly = cachedPlayers[lastSlot]\n\n    cachedPlayers[slot] = lastPly\n    playerSlotByEnt[lastPly:EntIndex()] = slot\n\n    cachedPlayers[lastSlot] = nil\n    playerSlotByEnt[ent] = nil\nend\n\nhook.Add(\"Initialize\", \"PlayerCache_Init\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        cachePlayerAdd(ply)\n    end\nend)\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", function(ply)\n    cachePlayerAdd(ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", function(ply)\n    cachePlayerRemove(ply)\nend)\n\nhook.Add(\"Think\", \"PlayerTick_CachedPlayers\", function()\n    for _, ply in ipairs(cachedPlayers) do\n        -- per-tick work using cached player list\n    end\nend)\n```\nReason: This replaces per-tick `player.GetAll()` scans with O(1)-update cache maintenance on join/leave hooks, so the tick loop only iterates a maintained table."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f18cc80df8999147","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":13091,"startedAt":"2026-07-11T07:39:24.627Z","completedAt":"2026-07-11T07:39:37.903Z","answerBytes":897,"answerChars":897,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":3054,"totalTokens":14901,"reasoningTokens":2774,"cachedTokens":11520},"finalResponse":"```lua\nlocal plyState = {} -- key by EntIndex, value = plain Lua table\n\nlocal function getState(ply)\n    local id = ply:EntIndex()\n    local s = plyState[id]\n    if s == nil then\n        s = {}\n        plyState[id] = s\n    end\n    return s\nend\n\nhook.Add(\"PlayerSpawn\", \"InitPlyState\", function(ply)\n    local s = getState(ply)\n    s.score = 0\n    s.lastShot = 0\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanupPlyState\", function(ply)\n    plyState[ply:EntIndex()] = nil\nend)\n\n-- hot path read\nlocal function updatePlayer(ply)\n    local s = plyState[ply:EntIndex()] -- one direct table lookup\n    if s and s.score > 0 then\n        s.lastShot = CurTime()\n    end\nend\n```\nReason: keying per-player temp data in a session-local table (numeric entity index -> data table) replaces repeated `ply.someField` entity-metatable lookups with a single cheap table lookup, which is faster for very frequent reads.","model_patch":"```lua\nlocal plyState = {} -- key by EntIndex, value = plain Lua table\n\nlocal function getState(ply)\n    local id = ply:EntIndex()\n    local s = plyState[id]\n    if s == nil then\n        s = {}\n        plyState[id] = s\n    end\n    return s\nend\n\nhook.Add(\"PlayerSpawn\", \"InitPlyState\", function(ply)\n    local s = getState(ply)\n    s.score = 0\n    s.lastShot = 0\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanupPlyState\", function(ply)\n    plyState[ply:EntIndex()] = nil\nend)\n\n-- hot path read\nlocal function updatePlayer(ply)\n    local s = plyState[ply:EntIndex()] -- one direct table lookup\n    if s and s.score > 0 then\n        s.lastShot = CurTime()\n    end\nend\n```\nReason: keying per-player temp data in a session-local table (numeric entity index -> data table) replaces repeated `ply.someField` entity-metatable lookups with a single cheap table lookup, which is faster for very frequent reads."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4778b0220c3f91a3","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":12563,"startedAt":"2026-07-11T07:39:24.680Z","completedAt":"2026-07-11T07:39:37.382Z","answerBytes":666,"answerChars":666,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11852,"completionTokens":1407,"totalTokens":13259,"reasoningTokens":1198,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster for fixed-size iteration: dense numeric array\nlocal actions = {\"move\", \"attack\", \"reload\", \"jump\"}\n\nfor i = 1, #actions do\n    local action = actions[i]\n    print(i, action)\nend\n\n-- String-keyed map (slower for same fixed collection)\nlocal actionMap = {\n    move = \"move\",\n    attack = \"attack\",\n    reload = \"reload\",\n    jump = \"jump\"\n}\n\nfor _, action in pairs(actionMap) do\n    print(action)\nend\n```\nReason: In Garry's Mod Lua, iterating a fixed collection is faster with a contiguous 1-based numeric array (`for i=1,#t`/`ipairs`) because it hits LuaJIT's array storage path and avoids hash lookups and unordered traversal from string-keyed maps.","model_patch":"```lua\n-- Faster for fixed-size iteration: dense numeric array\nlocal actions = {\"move\", \"attack\", \"reload\", \"jump\"}\n\nfor i = 1, #actions do\n    local action = actions[i]\n    print(i, action)\nend\n\n-- String-keyed map (slower for same fixed collection)\nlocal actionMap = {\n    move = \"move\",\n    attack = \"attack\",\n    reload = \"reload\",\n    jump = \"jump\"\n}\n\nfor _, action in pairs(actionMap) do\n    print(action)\nend\n```\nReason: In Garry's Mod Lua, iterating a fixed collection is faster with a contiguous 1-based numeric array (`for i=1,#t`/`ipairs`) because it hits LuaJIT's array storage path and avoids hash lookups and unordered traversal from string-keyed maps."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"d110fde8a37bbe59","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12252,"startedAt":"2026-07-11T07:39:24.811Z","completedAt":"2026-07-11T07:39:37.241Z","answerBytes":408,"answerChars":408,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":1290,"totalTokens":13141,"reasoningTokens":1140,"cachedTokens":11520},"finalResponse":"```lua\nlocal setColor = surface.SetDrawColor\nlocal r, g, b, a = 40, 120, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    for i = 1, 120 do\n        setColor(r, g, b, a) -- fastest in hot loops\n        surface.DrawRect(10, i * 2, 200, 2)\n    end\nend)\n```\nReason: Passing `r,g,b,a` directly avoids per-call Color table/object handling and field lookups, which is cheaper for high-frequency draw paths.","model_patch":"```lua\nlocal setColor = surface.SetDrawColor\nlocal r, g, b, a = 40, 120, 255, 255\n\nhook.Add(\"HUDPaint\", \"FastDraw\", function()\n    for i = 1, 120 do\n        setColor(r, g, b, a) -- fastest in hot loops\n        surface.DrawRect(10, i * 2, 200, 2)\n    end\nend)\n```\nReason: Passing `r,g,b,a` directly avoids per-call Color table/object handling and field lookups, which is cheaper for high-frequency draw paths."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"4a3f5d2a20d71ac9","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11672,"startedAt":"2026-07-11T07:39:25.359Z","completedAt":"2026-07-11T07:39:37.089Z","answerBytes":345,"answerChars":345,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11871,"completionTokens":771,"totalTokens":12642,"reasoningTokens":671,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamID = player:SteamID()\nlocal coins = sql.QueryValue(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: For one Garry's Mod server with no cross-server sync, local SQLite is typically lower latency than remote MySQL because it avoids network round-trips and stays in-process on the same machine.","model_patch":"```lua\nlocal steamID = player:SteamID()\nlocal coins = sql.QueryValue(\"SELECT coins FROM player_data WHERE steamid = \" .. sql.SQLStr(steamID))\n```\nReason: For one Garry's Mod server with no cross-server sync, local SQLite is typically lower latency than remote MySQL because it avoids network round-trips and stays in-process on the same machine."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"e8a94aa454154982","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20560,"startedAt":"2026-07-11T07:39:25.374Z","completedAt":"2026-07-11T07:39:46.047Z","answerBytes":892,"answerChars":892,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11844,"completionTokens":2315,"totalTokens":14159,"reasoningTokens":2043,"cachedTokens":11520},"finalResponse":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetCachedSteamID(ply)\n    if not IsValid(ply) then return nil end\n\n    local sid = steamIDCache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamIDCache[ply] = sid\n    return sid\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"steamid_cache_prime\", function(ply)\n    steamIDCache[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"steamid_cache_clear\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\nhook.Add(\"EntityRemoved\", \"steamid_cache_clear_removed\", function(ent)\n    if ent:IsPlayer() then\n        steamIDCache[ent] = nil\n    end\nend)\n```\nReason: Cache SteamID once per player and reuse it in hot loops via table lookup, eliminating repeated `ply:SteamID()` calls and reducing per-tick overhead while clearing cache on lifecycle changes to avoid stale/leaked entries.","model_patch":"```lua\nlocal steamIDCache = setmetatable({}, { __mode = \"k\" })\n\nlocal function GetCachedSteamID(ply)\n    if not IsValid(ply) then return nil end\n\n    local sid = steamIDCache[ply]\n    if sid ~= nil then\n        return sid\n    end\n\n    sid = ply:SteamID()\n    steamIDCache[ply] = sid\n    return sid\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"steamid_cache_prime\", function(ply)\n    steamIDCache[ply] = ply:SteamID()\nend)\n\nhook.Add(\"PlayerDisconnected\", \"steamid_cache_clear\", function(ply)\n    steamIDCache[ply] = nil\nend)\n\nhook.Add(\"EntityRemoved\", \"steamid_cache_clear_removed\", function(ent)\n    if ent:IsPlayer() then\n        steamIDCache[ent] = nil\n    end\nend)\n```\nReason: Cache SteamID once per player and reuse it in hot loops via table lookup, eliminating repeated `ply:SteamID()` calls and reducing per-tick overhead while clearing cache on lifecycle changes to avoid stale/leaked entries."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"b0cf9e04ae7c5dd9","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":17379,"startedAt":"2026-07-11T07:39:27.104Z","completedAt":"2026-07-11T07:39:44.548Z","answerBytes":724,"answerChars":724,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11843,"completionTokens":1683,"totalTokens":13526,"reasoningTokens":1444,"cachedTokens":11520},"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 5000 do\n    pieces[i] = \"piece\" .. i .. \", \"\nend\n\n-- Slow/avoid: repeated concatenation in a loop\nlocal function slow_concat(t)\n    local s = \"\"\n    for i = 1, #t do\n        s = s .. t[i]\n    end\n    return s\nend\n\n-- Fast: buffer chunks then concatenate once\nlocal function fast_concat(t)\n    local buf = {}\n    local n = 0\n    for i = 1, #t do\n        n = n + 1\n        buf[n] = t[i]\n    end\n    return table.concat(buf)\nend\n\nlocal big = fast_concat(pieces)\n```\nReason: In GMod Lua, repeated `..` in a loop repeatedly grows and copies the whole string, while collecting fragments in a table and calling `table.concat` once performs linear work and is much faster for thousands of pieces.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 5000 do\n    pieces[i] = \"piece\" .. i .. \", \"\nend\n\n-- Slow/avoid: repeated concatenation in a loop\nlocal function slow_concat(t)\n    local s = \"\"\n    for i = 1, #t do\n        s = s .. t[i]\n    end\n    return s\nend\n\n-- Fast: buffer chunks then concatenate once\nlocal function fast_concat(t)\n    local buf = {}\n    local n = 0\n    for i = 1, #t do\n        n = n + 1\n        buf[n] = t[i]\n    end\n    return table.concat(buf)\nend\n\nlocal big = fast_concat(pieces)\n```\nReason: In GMod Lua, repeated `..` in a loop repeatedly grows and copies the whole string, while collecting fragments in a table and calling `table.concat` once performs linear work and is much faster for thousands of pieces."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"696e8de769d9ad0e","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11162,"startedAt":"2026-07-11T07:39:27.169Z","completedAt":"2026-07-11T07:39:38.410Z","answerBytes":432,"answerChars":432,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":1053,"totalTokens":12904,"reasoningTokens":908,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster solid non-rounded rectangle draw in Garry's Mod client Lua\nhook.Add(\"HUDPaint\", \"FastRects\", function()\n    surface.SetDrawColor(255, 180, 40, 255)\n    surface.DrawRect(16, 16, 280, 40)\n    surface.DrawRect(16, 64, 280, 40)\nend)\n```\nReason: `surface.DrawRect` renders a plain filled rectangle directly, while `draw.RoundedBox(0, ...)` still routes through rounded-box logic that does extra work even at zero radius.","model_patch":"```lua\n-- Faster solid non-rounded rectangle draw in Garry's Mod client Lua\nhook.Add(\"HUDPaint\", \"FastRects\", function()\n    surface.SetDrawColor(255, 180, 40, 255)\n    surface.DrawRect(16, 16, 280, 40)\n    surface.DrawRect(16, 64, 280, 40)\nend)\n```\nReason: `surface.DrawRect` renders a plain filled rectangle directly, while `draw.RoundedBox(0, ...)` still routes through rounded-box logic that does extra work even at zero radius."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"95d9fe4918ee4197","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11888,"startedAt":"2026-07-11T07:39:27.579Z","completedAt":"2026-07-11T07:39:39.617Z","answerBytes":696,"answerChars":696,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11848,"completionTokens":1836,"totalTokens":13684,"reasoningTokens":1604,"cachedTokens":11520},"finalResponse":"```lua\n-- one-time font setup\nsurface.CreateFont(\"PerfSingleLine\", {\n    font = \"Roboto\",\n    size = 20,\n    weight = 600,\n    antialias = true\n})\n\nlocal text = \"FPS: \"\nlocal x, y = 16, 16\nlocal col = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"PerfSingleLine\")\n    surface.SetTextColor(col)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text .. math.floor(SysTime() * 1000))\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` is faster than `draw.DrawText`/`SimpleTextOutlined` because it avoids wrapper overhead (alignment logic, optional size queries, and extra outline passes).","model_patch":"```lua\n-- one-time font setup\nsurface.CreateFont(\"PerfSingleLine\", {\n    font = \"Roboto\",\n    size = 20,\n    weight = 600,\n    antialias = true\n})\n\nlocal text = \"FPS: \"\nlocal x, y = 16, 16\nlocal col = Color(255, 255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"FastSingleLineText\", function()\n    surface.SetFont(\"PerfSingleLine\")\n    surface.SetTextColor(col)\n    surface.SetTextPos(x, y)\n    surface.DrawText(text .. math.floor(SysTime() * 1000))\nend)\n```\nReason: `surface.SetFont` + `surface.SetTextColor` + `surface.SetTextPos` + `surface.DrawText` is faster than `draw.DrawText`/`SimpleTextOutlined` because it avoids wrapper overhead (alignment logic, optional size queries, and extra outline passes)."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3e9bbfc8452e05e3","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12031,"startedAt":"2026-07-11T07:39:30.367Z","completedAt":"2026-07-11T07:39:42.471Z","answerBytes":164,"answerChars":164,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11842,"completionTokens":478,"totalTokens":12320,"reasoningTokens":403,"cachedTokens":11520},"finalResponse":"```lua\nlocal arr = {10, 20, 30}\nlocal n = #arr\nprint(n) -- 3\n```\nReason: Use the length operator `#` (`#arr`) for a sequential, array-like table in Garry's Mod Lua.","model_patch":"```lua\nlocal arr = {10, 20, 30}\nlocal n = #arr\nprint(n) -- 3\n```\nReason: Use the length operator `#` (`#arr`) for a sequential, array-like table in Garry's Mod Lua."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"3a6344977f5bd475","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11789,"startedAt":"2026-07-11T07:39:30.983Z","completedAt":"2026-07-11T07:39:42.885Z","answerBytes":300,"answerChars":300,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11847,"completionTokens":793,"totalTokens":12640,"reasoningTokens":696,"cachedTokens":11520},"finalResponse":"```lua\n-- Fastest when you can replace the table reference\nt = {}\n```\nReason: In Garry's Mod Lua `table.Empty(t)` is O(n) because it iterates and nils each key, while `t = {}` is usually O(1), so reassigning to a fresh table is faster for large sequential tables when old references are not required.","model_patch":"```lua\n-- Fastest when you can replace the table reference\nt = {}\n```\nReason: In Garry's Mod Lua `table.Empty(t)` is O(n) because it iterates and nils each key, while `t = {}` is usually O(1), so reassigning to a fresh table is faster for large sequential tables when old references are not required."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"7d064428a873fdfc","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4174,"startedAt":"2026-07-11T07:39:31.107Z","completedAt":"2026-07-11T07:39:35.283Z","answerBytes":640,"answerChars":640,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11845,"completionTokens":803,"totalTokens":12648,"reasoningTokens":599,"cachedTokens":11520},"finalResponse":"```lua\nlocal list = {\"weapon_crowbar\", \"weapon_pistol\", \"weapon_smg1\", \"weapon_ar2\"}\n\n-- Faster set/prepared hash table\nlocal weaponSet = {}\nfor _, v in ipairs(list) do\n    weaponSet[v] = true\nend\n\n-- O(1)\nlocal function HasWeapon(name)\n    return weaponSet[name] == true\nend\n\n-- Slower legacy style (O(n), each call scans)\n-- local slow = table.HasValue(list, \"weapon_pistol\")\n\nif HasWeapon(\"weapon_pistol\") then\n    print(\"has weapon\")\nend\n```\nReason: Precompute a set-like table (`set[value] = true`) and test membership with `set[val]`, so repeated checks are constant-time instead of repeatedly scanning the list with `table.HasValue`.","model_patch":"```lua\nlocal list = {\"weapon_crowbar\", \"weapon_pistol\", \"weapon_smg1\", \"weapon_ar2\"}\n\n-- Faster set/prepared hash table\nlocal weaponSet = {}\nfor _, v in ipairs(list) do\n    weaponSet[v] = true\nend\n\n-- O(1)\nlocal function HasWeapon(name)\n    return weaponSet[name] == true\nend\n\n-- Slower legacy style (O(n), each call scans)\n-- local slow = table.HasValue(list, \"weapon_pistol\")\n\nif HasWeapon(\"weapon_pistol\") then\n    print(\"has weapon\")\nend\n```\nReason: Precompute a set-like table (`set[value] = true`) and test membership with `set[val]`, so repeated checks are constant-time instead of repeatedly scanning the list with `table.HasValue`."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"f95a8fc610d720ad","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10940,"startedAt":"2026-07-11T07:39:31.371Z","completedAt":"2026-07-11T07:39:42.313Z","answerBytes":430,"answerChars":430,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11846,"completionTokens":734,"totalTokens":12580,"reasoningTokens":604,"cachedTokens":11520},"finalResponse":"```lua\n-- Faster: construct once with known fields\nlocal actor = {\n    name = \"gman\",\n    health = 100,\n    armor = 50,\n}\n\n-- Slower: extra table writes after creation\nlocal actorSlow = {}\nactorSlow.name = \"gman\"\nactorSlow.health = 100\nactorSlow.armor = 50\n```\nReason: Use the constructor form, because it performs one table creation + literal field setup in one expression instead of multiple post-creation assignment operations.","model_patch":"```lua\n-- Faster: construct once with known fields\nlocal actor = {\n    name = \"gman\",\n    health = 100,\n    armor = 50,\n}\n\n-- Slower: extra table writes after creation\nlocal actorSlow = {}\nactorSlow.name = \"gman\"\nactorSlow.health = 100\nactorSlow.armor = 50\n```\nReason: Use the constructor form, because it performs one table creation + literal field setup in one expression instead of multiple post-creation assignment operations."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":1,"rubricVersion":"2","promptHash":"f3e090701953d4a9","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11311,"startedAt":"2026-07-11T07:39:31.797Z","completedAt":"2026-07-11T07:39:43.111Z","answerBytes":279,"answerChars":279,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11840,"completionTokens":2120,"totalTokens":13960,"reasoningTokens":2025,"cachedTokens":11520},"finalResponse":"```lua\nlocal rand = math.random\n\nlocal function randomFromSequential(t)\n    local n = #t\n    return n > 0 and t[rand(n)] or nil\nend\n```\nReason: Direct integer indexing (`t[math.random(n)]`) uses O(1) array access and avoids `table.Random`'s generic non-sequential-table handling.","model_patch":"```lua\nlocal rand = math.random\n\nlocal function randomFromSequential(t)\n    local n = #t\n    return n > 0 and t[rand(n)] or nil\nend\n```\nReason: Direct integer indexing (`t[math.random(n)]`) uses O(1) array access and avoids `table.Random`'s generic non-sequential-table handling."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":1,"rubricVersion":"1","promptHash":"79d48008f6b5174f","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3606,"startedAt":"2026-07-11T07:39:31.897Z","completedAt":"2026-07-11T07:39:35.506Z","answerBytes":229,"answerChars":229,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11839,"completionTokens":566,"totalTokens":12405,"reasoningTokens":479,"cachedTokens":11520},"finalResponse":"```lua\nlocal acc = 0\nfor i = 1, #values do\n    local x = values[i]\n    acc = acc + x * x\nend\n```\nReason: `x * x` is direct multiplication (no function lookup or call overhead), which is the fastest way to square in Lua hot loops.","model_patch":"```lua\nlocal acc = 0\nfor i = 1, #values do\n    local x = values[i]\n    acc = acc + x * x\nend\n```\nReason: `x * x` is direct multiplication (no function lookup or call overhead), which is the fastest way to square in Lua hot loops."}
{"runId":"ddc5aa24-4d6c-4889-9348-24344c06a4ec","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":2,"rubricVersion":"4","promptHash":"fe3d7469535a0ca2","adapterId":"codex","model":"gpt-5.3-codex-spark@xhigh","model_name_or_path":"gpt-5.3-codex-spark@xhigh","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":11305,"startedAt":"2026-07-11T07:39:32.286Z","completedAt":"2026-07-11T07:39:43.633Z","answerBytes":244,"answerChars":244,"httpStatus":null,"httpAttempts":null,"exitCode":0,"usage":{"source":"provider","promptTokens":11851,"completionTokens":829,"totalTokens":12680,"reasoningTokens":754,"cachedTokens":0},"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- process each connected player\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and iterating it with `ipairs` visits each player once in a concise modern Lua loop.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- process each connected player\nend\n```\nReason: `player.GetAll()` returns all currently connected players, and iterating it with `ipairs` visits each player once in a concise modern Lua loop."}
