perf(math): inline measured high-low arithmetic call boundaries
This commit is contained in:
@@ -182,6 +182,29 @@ MSVC Debug에서 unit/integration/CLI consumer를 36개 edge로 재빌드했고,
|
||||
[검사 로그](../../.harness/performance/shared-bitscan/after-checks.txt)를 보존한다.
|
||||
새 검색의 전체 동적 시간, 최종 reference 및 전체 Debug 판정은 아직 미실행이다.
|
||||
|
||||
Bit-scan 적용 소스의 동적 개발 단일 실행도 150.1015395초 제한 안에 완료되지
|
||||
않았다. 새 30초 SW 수집은 collector native 4의 부분 자료이고 report 세 개는
|
||||
native 0이다. `TwoSum` 33.144893, `LowestBitExponent` 11.061455 sampled CPU초와
|
||||
독립 start address/호출 경로가 확인되어 두 helper의 MSVC 호환 x64 선언에만
|
||||
`__forceinline`을 적용했다. 본문·guard·HighLow layout·signature·전역 compiler
|
||||
flags는 그대로다. 다른 경로는 `inline`을 유지한다.
|
||||
[Microsoft 설명](https://learn.microsoft.com/en-us/cpp/cpp/inline-functions-cpp?view=msvc-170)처럼
|
||||
이는 expansion 요청이며 실제 inline이나 속도 향상을 보장하지 않는다.
|
||||
|
||||
[독립 source 검토](../../.harness/performance/shared-inline/source-numerical-review.md)는
|
||||
ODR·지원 환경·산술 의미의 보존을 확인했다. 변경된 실제 최적화 codegen의 반증을
|
||||
위해 정확한 include prefix의 **fresh Release**에서 unit/integration/CLI를
|
||||
205개 edge로 빌드하고 frozen oracle 및 통합 consumer **68/68을 native 0**으로
|
||||
검증했다. [실제 기록](../../.harness/performance/shared-inline/after-native.json)과
|
||||
[검사 로그](../../.harness/performance/shared-inline/after-checks.txt)를 보존한다.
|
||||
Debug의 `/Ob0` 검사 시간을 Release 개선 배수로 사용하지 않는다. 새 선언의
|
||||
전체 모델 시간, disassembly와 최종 검증은 아직 미확인이다.
|
||||
|
||||
해당 SW 수집은 export wrapper가 metadata 경로를 재사용해 수집 전 기록이
|
||||
덮어써졌다는 한계가 있다. 남은 전후 hash는 export 구간과 이전 고정 binary의
|
||||
일치만 증명한다. 전체 수집의 독립 identity 대조로 확대하지 않으며, 후속 wrapper는
|
||||
수집과 export 기록을 분리한다. 원래 실패·unknown target exit 자료도 보존한다.
|
||||
|
||||
통합한 Hex8의 ordinary MKL 연산, 원래 누적·진단 순서, private pair의 영항 생략과
|
||||
선택적 선형 tangent의 지연 준비는 [전용 기록](hex8-performance.md)에 있다.
|
||||
선택적 준비는 Float64 Create의 필수 검사를 바꾸지 않으며 검증된 현재 trial의
|
||||
|
||||
@@ -55,7 +55,13 @@ inline bool IsFinite(HighLow value) {
|
||||
return IsFiniteBinary64(value.high) && IsFiniteBinary64(value.low);
|
||||
}
|
||||
/// @brief Recovers the exact error of supported finite binary64 addition.
|
||||
inline HighLow TwoSum(double left, double right) {
|
||||
/// @note Requests local expansion at the measured MSVC x64 call boundary.
|
||||
#if defined(_MSC_VER) && defined(_M_X64)
|
||||
__forceinline
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
HighLow TwoSum(double left, double right) {
|
||||
const double sum = left + right;
|
||||
const double bridge = sum - left;
|
||||
const double restored_left = sum - bridge;
|
||||
@@ -105,7 +111,13 @@ inline HighLow Subtract(HighLow left, HighLow right) {
|
||||
}
|
||||
/// @brief Returns the exponent of the least nonzero binary64 significand bit.
|
||||
/// @pre value is finite and nonzero; gradual underflow is enabled.
|
||||
inline int LowestBitExponent(double value) {
|
||||
/// @note Keeps the small integer search inside its measured MSVC x64 caller.
|
||||
#if defined(_MSC_VER) && defined(_M_X64)
|
||||
__forceinline
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
int LowestBitExponent(double value) {
|
||||
static_assert(sizeof(double) == sizeof(std::uint64_t) &&
|
||||
std::numeric_limits<double>::is_iec559 &&
|
||||
std::numeric_limits<double>::digits == 53);
|
||||
|
||||
Reference in New Issue
Block a user