From 26be644f0b312cc5091bef2e5ebd043763894136 Mon Sep 17 00:00:00 2001 From: "KOKO\\Mimi" Date: Wed, 14 Oct 2026 19:16:48 +0900 Subject: [PATCH] docs(performance): distinguish bit-scan profile exits and remaining pair costs --- .../hex8-performance.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/docs/calculation-performance/hex8-performance.md b/docs/calculation-performance/hex8-performance.md index df9081c..2d4e3e3 100644 --- a/docs/calculation-performance/hex8-performance.md +++ b/docs/calculation-performance/hex8-performance.md @@ -284,6 +284,59 @@ execution_valid는 false이며 최종 HDF5가 없어 101-frame U 비교는 미 개선 비율을 계산하지 않는다. Bit-scan의 source/Debug 검증 PASS를 동적 100초 목표의 합격으로 확대하지 않는다. +## Bit-scan 소스의 남은 병목 + +같은 binary로 별도 승인된 software sampling 30초를 한 번 수집했다. 새 wrapper는 +ProcessStartInfo의 stdout/stderr를 비동기로 분리하고 collector의 actual native를 +즉시 기록했다. Collector native는 4, wrapper는 1이며 이 값을 성공으로 바꾸지 +않는다. Raw result는 finalize 100%를 완료했고 기존 자료의 함수·전체 callstack· +summary export는 각각 native 0, 별도 export wrapper도 0이었다. Target native는 +독립 포착하지 못해 unknown이다. 관측한 owned descendant PID 5개의 시작 ticks를 +보존했으며 강제 종료 없이 모두 닫혔다. 관련 프로세스도 0개였다. +[실제 명령과 종료](../../.harness/performance/t3/vtune-dynamic-bitscan-native.json)를 보존한다. + +[Summary](../../.harness/performance/t3/vtune-dynamic-bitscan-summary.csv)의 구간 elapsed는 +29.859555초, CPU 227.129758초, effective 185.250598초, spin 36.140758초, +overhead 5.738402초다. 수집·finalization을 포함한 collector 경과 41.2746919초와 +구별하며 어느 값도 전체 시간 목표 판정으로 사용하지 않는다. +[함수](../../.harness/performance/t3/vtune-dynamic-bitscan-functions.csv)와 +[전체 호출 경로](../../.harness/performance/t3/vtune-dynamic-bitscan-callstacks.csv)는 +TwoSum·Add·Multiply·MultiplyPair를 거쳐 nonlinear EvaluateHighLow로 이어지는 +병목이 남음을 보여준다. + +| 함수 | 보고된 self CPU초 | 제한된 core 경로의 inclusive CPU초 | +| --- | ---: | ---: | +| LowestBitExponent | 11.061455 | 11.061455 | +| TwoSum | 33.144893 | 33.144893 | +| Add | 6.402455 | 33.202178 | +| Multiply | 13.868298 | 51.911387 | +| MultiplyPair | 9.711280 | 71.850858 | +| AddPair | 4.231358 | 16.787786 | + +Self는 같은 함수 이름의 export 행들을 합한 값이다. Inclusive 열은 각 blank로 +구분한 stack의 첫 양수 weight 중 다른 arithmetic helper leaf만 더한 제한된 +집계다. 같은 주소로 표시되는 inline finite/normalized/constructor attribution은 +합산에서 제외했다. 완전한 inclusive 비용이 아니며 중첩 그룹을 서로 합산하지 +않는다. [집계 근거](../../.harness/performance/t3/vtune-dynamic-bitscan-path-summary.json)에 +방법과 leaf별 자료를 남겼다. + +LBE/TwoSum의 독립 주소와 호출 경로는 out-of-line 경계 후보를 뒷받침하지만 실제 +disassembly는 실행하지 않아 call/spill 수를 확정하지 않았다. HighLow는 16-byte +사용자 정의 pair이며 out-of-line 기본 MSVC x64 ABI에서는 간접 인자·반환 저장소가 +필요하다. [Microsoft ABI 문서](https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170)가 +이 구조체의 호출 경계 근거다. Root가 검토할 좁은 MSVC x64 force-inline 후보는 +식·guard·flags를 유지하며 실제 codegen과 개발 실행으로 효과를 확인해야 한다. + +AddPair 검증 뒤의 Add와 양 low 비zero MultiplyPair 뒤의 Multiply는 normalized +입력 guard를 반복한다. 이는 source로 확인한 중복이며 inline finite attribution을 +별도 비용으로 더해 절감량을 추정하지 않는다. Guard 제거보다 좁은 inline 후보를 +먼저 검토하도록 전달했으며 이 단계에서 production을 수정하거나 추가 실행하지 않았다. + +[Identity 자료](../../.harness/performance/t3/vtune-dynamic-bitscan-metadata.json)의 최종 +before/after는 export 경계를 기록한다. 수집 전 준비 metadata는 export wrapper가 +덮어썼으므로 독립 보존된 전체 수집 전후 대조로 주장하지 않는다. 최종 binary와 +header/input hash는 고정된 이전 동적 실행과 같으며 이 한계를 함께 보존한다. + 84개 실행과 추가 두 검사 실행은 서로 다른 검사 범위다. 이를 하나의 최종 전체 검사 실행으로 표시하지 않는다. 최종 전체 Debug/CTest, Hex8 필수 원본 5개 비교, 동적 101-frame 비교, 최종 VTune과 공식 단일 시간 측정은 아직 이 작업의 개발