Skip to content

0.7.1 Performance And Semantic Audit

このページは 0.7.1 最適化監査の日本語版です。0.7.0 後の四つの最適化 commit、 release review で発見・修正した意味論上の問題、および performance claim の証拠範囲を記録します。

Scope

監査対象は 69084bc790401623005ed4fd41ad と、この release tree に 追加された GDA coefficient helper および interval regression repair です。観測、規範的な 期待、実装判断、acceptance evidence を別々の事実として扱います。

Issue Matrix

RowClassObservedExpectedChangeAcceptance evidence
GDA coefficient kernelsimplementation gap小さい表現、remainder-only division、half-power 比較を追加coefficient identity、cohort、flags、trap、sticky status が不変canonical GdaCoeff 操作と共通 GDA finalizer を維持package 93 tests、frontend 8 tests、official 64,986/64,986、official0 16,124/16,124
IEEE decimal pathssemantic-risk optimizationexact/bounded division が重複する generic work を省略exact result、rounding、quantum、flags、special values が IEEE と一致finite domain、factor、bound、finalization predicate で保護し、失敗時は fallbackpackage 94 tests、four-target IEEE 15,763/15,763
Binary IEEE pathssemantic-risk optimizationexact-top、round/sticky extraction、coefficient dispatch を導入contextual value、rounding、flags、signed zero、interchange bits が不変exact coefficient を作り、全結果を contextual rounding に通すpackage 68 tests、binary 7,464,503/7,464,503
Interval endpoint dispatchsemantic deviation found and fixedoptimized pown が sign region 間で direction を再利用し、負区間で lo > hi または 1 ulp 欠落返る interval は順序付きで数学的 image を含むmonotonicity で endpoint を選び、各候補を outward rounding;negative-half-axis を追加package 42 tests、integer-power 174/174、strict ITF1788 4,656/4,656
Release documentationdocumentation gapmodule、manifest、localized prose に 0.7.0 が残ったcurrent reference は 0.7.1、historical note は過去のままcurrent metadata と同期 audit page を更新python3 tools/doc_quality.py

Optimization Proofs

Exact coefficient paths

非負 coefficient a と正の divisor d に対する remainder は r = a - floor(a / d) * d0 <= r < d です。したがって quotient/remainder 呼出しを remainder-only kernel に置き換えても、観測可能な remainder と Euclidean algorithm の各 step は変わりません。 GDA half-power predicate は leading decimal digit と非零 tail で a5 * 10^(digits(a) - 1) を比較するため、floating estimate ではありません。

IEEE decimal の exact-division path は coefficient GCD を除去し、reduced denominator が 2 と 5 以外の 素因子を持たない場合だけ有効です。exact coefficient/exponent を作った後は既存 finalizer を呼び、factor、bound、 special-value precondition が満たされなければ generic path に戻ります。最適化が変えるのは exact value への経路であり、 IEEE の rounding/flag rule ではありません。

Binary contextual paths

有限 dyadic を c * 2^e と書くと、binary_exact_top(c, e) は最高位の exact bit を示します。これらの top の比較は、 trailing power-of-two が異なる coefficient でも alignment 前の magnitude 比較と同値です。遠い addend を捨てる際は、 最初の discarded bit と後続 bit の OR を保存し、contextual rounding が使う round/sticky predicate をそのまま保ちます。 巨大な aligned coefficient を materialize しないだけで、exact rounding input は変わりません。

Directed interval paths

Interval operation は image(X) subset [lo, hi]lo <= hi を満たす必要があります。exact endpoint candidate y に対し、 RoundTowardNegative(y) は lower certificate、RoundTowardPositive(y) は upper certificate です。pown の monotonicity は次の通りです。

DomainPositive odd powerPositive even powerNegative odd powerNegative even power
negative half-axisincreasingdecreasingdecreasingincreasing
positive half-axisincreasingincreasingdecreasingdecreasing
interval containing zeroendpoint orderzero to outward-rounded maximumpole/whole-real splitpole/whole-real split

実装は mathematical endpoint を先に選び、その役割に合う rounding direction を適用します。zero を跨ぐ場合、有限の extremum candidate は両方とも upper bound 用に upward rounding します。その後 quantize_interval が再び outward rounding を行います。 この説明は宣言済み operation と precision contract に限られ、未対応 reverse operation は含みません。

Performance Evidence

AreaMeasurementInterpretation
Binary、decimal、GDA、interval kerneljust bench all --target nativecurrent tree の四つの Maremark suite が valid artifact を生成
Binary square policyjust bench auto-tune --target nativetarget-specific policy artifact を生成;raw observation は non-monotonic になり得るため universal threshold ではない
IEEE/GDA fast pathbenchmark package test と conformance gatesemantic oracle が green の場合だけ performance route を採用できる
Interval endpoint dispatchsrc/bench/ball_float と strict ITF1788ordered な outward enclosure が成立する場合だけ cost reduction を受け入れる

生成 artifact は .tmp/bench/ に保存され、API data として公開しません。crossover を昇格する前に対象 hardware で再実行してください。 benchmark workload は current tree の測定証拠であり、release 全体の speedup、target 間の性能同値、universal latency bound は証明しません。

Acceptance Matrix

CheckResult
sh tools/run_moon_clean_exec.sh test src/decimal_gda --target native --deny-warn --frozen --no-parallelize93/93 passed
sh tools/run_moon_clean_exec.sh test src/decimal --target native --deny-warn --frozen --no-parallelize94/94 passed
sh tools/run_moon_clean_exec.sh test src/bin_float --target native --deny-warn --frozen --no-parallelize68/68 passed
sh tools/run_moon_clean_exec.sh test src/ball_float --target native --deny-warn --frozen --no-parallelize42/42 passed
just gate binary 87,464,503/7,464,503 passed
just gate decimal 815,763/15,763 passed
just gate decimal_gda 864,986/64,986 と 16,124/16,124 passed
just gate interval 84,656/4,656 passed
python3 tools/doc_quality.pyversion、audit page、design proof 変更後に passed

Reviewer Self-Review

  • Contribution: pass — unexplained speed claim ではなく、具体的な optimization boundary と実際の semantic failure repair を記録。
  • Writing clarity: pass — 各 proof section が representation、monotonicity、rounding direction、evidence を分離。
  • Experimental strength: needs replication — native artifact は valid だが、threshold promotion 前に non-monotonic auto-tune を再測定する。
  • Evaluation completeness: declared pinned corpus について pass;全標準 operation や arbitrary real input の claim ではない。
  • Method soundness: pass — negative-half-axis regression と full 1788 gate で修正 branch を検証。

Claim-Evidence Map

ClaimEvidenceStatus
Fast coefficient route は declared numerical result を保持するexact-kernel identity、package test、IEEE/GDA conformancedeclared API と precondition の範囲で supported
Interval pown は ordered outward enclosure を保持するmonotonicity table、negative-half-axis regression、4,656 strict ITF1788declared forward interval surface で supported
この release は performance audit 済みであるnative Maremark allauto-tune artifactmeasurement evidence として supported;universal speed claim ではない
すべての future target/operation が同等の性能を持つcross-target paired artifact は本監査にないneeds evidence;明示的に claim しない

Limits

Semantic claim は pinned corpus、public operation surface、target-specific precision rule、明示的 fallback contract に限定されます。 0.6.1 elementary manifest は historical comparison baseline のままで、0.7.1 が current candidate release です。benchmark 改善だけを理由に public API、rounding rule、error signal、interval contract を変更しません。