Skip to content

Commit 03ed12a

Browse files
committed
repo: try to reduce userdata by 16 bytes
1 parent 3e50630 commit 03ed12a

File tree

19 files changed

+1726
-896
lines changed

19 files changed

+1726
-896
lines changed

.github/workflows/compile-luajit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
paths:
7+
- '.github/workflows/compile-luajit.yml'
78
- 'libs/liblua_shared_lib_*'
89
- 'libs/lua_shared_lib_*'
910
- 'luajit/**'

.github/workflows/show_summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build JIT
1+
name: Show Summary
22

33
on:
44
workflow_dispatch:

source/_prebuildtools/_workflow_summary.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function FetchFromHolyLogs(github_repository, runNumber, host, apikey, previous_
6969

7070
if previous_run_number > 0 then
7171
local lastHolyLogsResults = {}
72-
FetchHolyLogsResults(github_repository, runNumber, function(jsonTable)
72+
FetchHolyLogsResults(github_repository, previous_run_number, function(jsonTable)
7373
lastHolyLogsResults = jsonTable
7474
end, host, apikey)
7575

@@ -200,7 +200,7 @@ function CalculateDifferences(currentResults, previousResults)
200200
end
201201

202202
funcResults.timePerCall = funcResults.totalTime / funcResults.totalCalls
203-
funcResults.diffTimePerCall = prevFuncResults and (funcResults.timePerCall / prevFuncResults.timePerCall) or 1
203+
funcResults.diffTimePerCall = prevFuncResults and (prevFuncResults.timePerCall / funcResults.timePerCall) or 1
204204
end
205205
end
206206
end
@@ -219,8 +219,12 @@ Previous run: ]] .. previousRun .. "<br>")
219219
table.insert(markdown, "| ------------- | ----------- | ------------- | ---------------------- |")
220220

221221
for funcName, funcResults in pairs(funcs) do
222-
if math.abs(1 - funcResults.diffTimePerCall) > 0.20 then -- It may fluxuate between builds because of different runners/hardware but it shouldn't worsen by more than 20%
223-
print("::warning title=" .. funcName .. "::Performance is worse beyond expectation")
222+
local diff = funcResults.diffTimePerCall
223+
local maxDiff = 0.20 -- It may fluxuate between builds because of different runners/hardware but it shouldn't worsen by more than 20%
224+
if diff > (1 + maxDiff) then
225+
print("::warning title=" .. funcName .. "::Performance is worse beyond expectation (" .. string.format("%.2fx", diff) .. " slower)")
226+
elseif diff < (1 - maxDiff) then
227+
print("::notice title=" .. funcName .. "::Performance improved significantly (" .. string.format("%.2fx", 1 / diff) .. " faster)")
224228
end
225229

226230
table.insert(markdown, "| " .. funcName .. " | " .. funcResults.totalCalls .. " | " .. funcResults.timePerCall .. " | " .. funcResults.diffTimePerCall .. "x |")

source/detouring/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
We need a custom version since the original does NOT allow one to hook multiple instances if they have different VTables.<br>
2+
We hit this special case with the `CLuaInterfaceProxy` inside of `lua.cpp` were we can hook both into Gmod's `ILuaInterface` VTable but **also** into our own `ILuaInterface` VTable which wasn't possible previously and it only hooked into the first VTable while for the second one it never hooked into it even though it would report hooking as successful.

0 commit comments

Comments
 (0)