From 3c222d78b8e7716a2cc2d7325220491ba7b6f4f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:39:12 +0000 Subject: [PATCH 1/3] Initial plan From 9b86fbc9d7cb3adf6de7fdb28e37938f46b1ca83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:40:48 +0000 Subject: [PATCH 2/3] Expand performance test and change to times-based format - Increased test processes from 6 to 15 (added smss, wininit, dwm, RuntimeBroker, SearchIndexer, spoolsv, taskhostw, fontdrvhost, conhost) - Changed output format from percentage-based (99.99% faster) to times-based (10x faster, 2.5x faster) - Improved readability and usefulness of performance comparisons Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> --- .github/workflows/perf-compare.yml | 47 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/.github/workflows/perf-compare.yml b/.github/workflows/perf-compare.yml index 571a7e6..b8fb95f 100644 --- a/.github/workflows/perf-compare.yml +++ b/.github/workflows/perf-compare.yml @@ -114,7 +114,16 @@ jobs: "lsass", "csrss", "services", - "svchost" + "svchost", + "smss", + "wininit", + "dwm", + "RuntimeBroker", + "SearchIndexer", + "spoolsv", + "taskhostw", + "fontdrvhost", + "conhost" ) Write-Host "Testing process lookup performance on $($testProcesses.Count) processes" -ForegroundColor Yellow @@ -231,24 +240,30 @@ jobs: Write-Host "=====================================" -ForegroundColor Cyan Write-Host "" - # Calculate speed differences - $cppVsGo = [Math]::Round((($goTotal - $cppTotal) / $goTotal) * 100, 1) - + # Calculate speed differences using times instead of percentages Write-Host "Performance comparison:" -ForegroundColor Yellow - if ($cppVsGo -gt 0) { - Write-Host " C++ is $cppVsGo% faster than Go" -ForegroundColor Green - } elseif ($cppVsGo -lt 0) { - Write-Host " C++ is $([Math]::Abs($cppVsGo))% slower than Go" -ForegroundColor Red - } else { - Write-Host " C++ and Go have equal performance" -ForegroundColor Yellow + + # C++ vs Go + if ($cppTotal -gt 0) { + $cppVsGoTimes = [Math]::Round($goTotal / $cppTotal, 1) + if ($cppVsGoTimes -gt 1) { + Write-Host " C++ is $($cppVsGoTimes)x faster than Go" -ForegroundColor Green + } elseif ($cppVsGoTimes -lt 1) { + $goVsCppTimes = [Math]::Round($cppTotal / $goTotal, 1) + Write-Host " C++ is $($goVsCppTimes)x slower than Go" -ForegroundColor Red + } else { + Write-Host " C++ and Go have equal performance" -ForegroundColor Yellow + } } - if ($hasRust) { - $cppVsRust = [Math]::Round((($rustTotal - $cppTotal) / $rustTotal) * 100, 1) - if ($cppVsRust -gt 0) { - Write-Host " C++ is $cppVsRust% faster than Rust" -ForegroundColor Green - } elseif ($cppVsRust -lt 0) { - Write-Host " C++ is $([Math]::Abs($cppVsRust))% slower than Rust" -ForegroundColor Red + # C++ vs Rust + if ($hasRust -and $cppTotal -gt 0) { + $cppVsRustTimes = [Math]::Round($rustTotal / $cppTotal, 1) + if ($cppVsRustTimes -gt 1) { + Write-Host " C++ is $($cppVsRustTimes)x faster than Rust" -ForegroundColor Green + } elseif ($cppVsRustTimes -lt 1) { + $rustVsCppTimes = [Math]::Round($cppTotal / $rustTotal, 1) + Write-Host " C++ is $($rustVsCppTimes)x slower than Rust" -ForegroundColor Red } else { Write-Host " C++ and Rust have equal performance" -ForegroundColor Yellow } From f89cf6a1ff63f373b7e372445c4d1f863304bcb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:41:50 +0000 Subject: [PATCH 3/3] Fix performance comparison logic and address code review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed comparison logic: when other tool is faster, say "Go is Nx faster" instead of "C++ is Nx slower" - Changed threshold from exact equality to ±10% for "similar performance" - Added safety checks for division by zero - More intuitive and grammatically correct output Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> --- .github/workflows/perf-compare.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/perf-compare.yml b/.github/workflows/perf-compare.yml index b8fb95f..1c738f5 100644 --- a/.github/workflows/perf-compare.yml +++ b/.github/workflows/perf-compare.yml @@ -244,28 +244,28 @@ jobs: Write-Host "Performance comparison:" -ForegroundColor Yellow # C++ vs Go - if ($cppTotal -gt 0) { + if ($cppTotal -gt 0 -and $goTotal -gt 0) { $cppVsGoTimes = [Math]::Round($goTotal / $cppTotal, 1) - if ($cppVsGoTimes -gt 1) { + if ($cppVsGoTimes -ge 1.1) { Write-Host " C++ is $($cppVsGoTimes)x faster than Go" -ForegroundColor Green - } elseif ($cppVsGoTimes -lt 1) { + } elseif ($cppVsGoTimes -le 0.9) { $goVsCppTimes = [Math]::Round($cppTotal / $goTotal, 1) - Write-Host " C++ is $($goVsCppTimes)x slower than Go" -ForegroundColor Red + Write-Host " Go is $($goVsCppTimes)x faster than C++" -ForegroundColor Red } else { - Write-Host " C++ and Go have equal performance" -ForegroundColor Yellow + Write-Host " C++ and Go have similar performance" -ForegroundColor Yellow } } # C++ vs Rust - if ($hasRust -and $cppTotal -gt 0) { + if ($hasRust -and $cppTotal -gt 0 -and $rustTotal -gt 0) { $cppVsRustTimes = [Math]::Round($rustTotal / $cppTotal, 1) - if ($cppVsRustTimes -gt 1) { + if ($cppVsRustTimes -ge 1.1) { Write-Host " C++ is $($cppVsRustTimes)x faster than Rust" -ForegroundColor Green - } elseif ($cppVsRustTimes -lt 1) { + } elseif ($cppVsRustTimes -le 0.9) { $rustVsCppTimes = [Math]::Round($cppTotal / $rustTotal, 1) - Write-Host " C++ is $($rustVsCppTimes)x slower than Rust" -ForegroundColor Red + Write-Host " Rust is $($rustVsCppTimes)x faster than C++" -ForegroundColor Red } else { - Write-Host " C++ and Rust have equal performance" -ForegroundColor Yellow + Write-Host " C++ and Rust have similar performance" -ForegroundColor Yellow } } Write-Host ""