Skip to content

Commit 6feabdd

Browse files
Merge pull request #86 from supervoidcoder/copilot/update-performance-comparison-test
Expand perf comparison test and switch to times-based metrics
2 parents 76be22f + f89cf6a commit 6feabdd

1 file changed

Lines changed: 32 additions & 17 deletions

File tree

.github/workflows/perf-compare.yml

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,16 @@ jobs:
114114
"lsass",
115115
"csrss",
116116
"services",
117-
"svchost"
117+
"svchost",
118+
"smss",
119+
"wininit",
120+
"dwm",
121+
"RuntimeBroker",
122+
"SearchIndexer",
123+
"spoolsv",
124+
"taskhostw",
125+
"fontdrvhost",
126+
"conhost"
118127
)
119128
120129
Write-Host "Testing process lookup performance on $($testProcesses.Count) processes" -ForegroundColor Yellow
@@ -231,26 +240,32 @@ jobs:
231240
Write-Host "=====================================" -ForegroundColor Cyan
232241
Write-Host ""
233242
234-
# Calculate speed differences
235-
$cppVsGo = [Math]::Round((($goTotal - $cppTotal) / $goTotal) * 100, 1)
236-
243+
# Calculate speed differences using times instead of percentages
237244
Write-Host "Performance comparison:" -ForegroundColor Yellow
238-
if ($cppVsGo -gt 0) {
239-
Write-Host " C++ is $cppVsGo% faster than Go" -ForegroundColor Green
240-
} elseif ($cppVsGo -lt 0) {
241-
Write-Host " C++ is $([Math]::Abs($cppVsGo))% slower than Go" -ForegroundColor Red
242-
} else {
243-
Write-Host " C++ and Go have equal performance" -ForegroundColor Yellow
245+
246+
# C++ vs Go
247+
if ($cppTotal -gt 0 -and $goTotal -gt 0) {
248+
$cppVsGoTimes = [Math]::Round($goTotal / $cppTotal, 1)
249+
if ($cppVsGoTimes -ge 1.1) {
250+
Write-Host " C++ is $($cppVsGoTimes)x faster than Go" -ForegroundColor Green
251+
} elseif ($cppVsGoTimes -le 0.9) {
252+
$goVsCppTimes = [Math]::Round($cppTotal / $goTotal, 1)
253+
Write-Host " Go is $($goVsCppTimes)x faster than C++" -ForegroundColor Red
254+
} else {
255+
Write-Host " C++ and Go have similar performance" -ForegroundColor Yellow
256+
}
244257
}
245258
246-
if ($hasRust) {
247-
$cppVsRust = [Math]::Round((($rustTotal - $cppTotal) / $rustTotal) * 100, 1)
248-
if ($cppVsRust -gt 0) {
249-
Write-Host " C++ is $cppVsRust% faster than Rust" -ForegroundColor Green
250-
} elseif ($cppVsRust -lt 0) {
251-
Write-Host " C++ is $([Math]::Abs($cppVsRust))% slower than Rust" -ForegroundColor Red
259+
# C++ vs Rust
260+
if ($hasRust -and $cppTotal -gt 0 -and $rustTotal -gt 0) {
261+
$cppVsRustTimes = [Math]::Round($rustTotal / $cppTotal, 1)
262+
if ($cppVsRustTimes -ge 1.1) {
263+
Write-Host " C++ is $($cppVsRustTimes)x faster than Rust" -ForegroundColor Green
264+
} elseif ($cppVsRustTimes -le 0.9) {
265+
$rustVsCppTimes = [Math]::Round($cppTotal / $rustTotal, 1)
266+
Write-Host " Rust is $($rustVsCppTimes)x faster than C++" -ForegroundColor Red
252267
} else {
253-
Write-Host " C++ and Rust have equal performance" -ForegroundColor Yellow
268+
Write-Host " C++ and Rust have similar performance" -ForegroundColor Yellow
254269
}
255270
}
256271
Write-Host ""

0 commit comments

Comments
 (0)