Text file src/simd/archsimd/_gen/SPEC-STATS.txt

     1  SIMD spec transition progress
     2  
     3  Generated by archsimd/_gen/cmd/specstats; do not edit.
     4  Regenerate with: go run ./cmd/specstats -w
     5  
     6  Every fraction heads for 100%; every count heads for zero. Bracketed
     7  names are SPEC-TRANSITION.md tasks that move the figure. Indented,
     8  untagged numbers are context breaking down the figure above them.
     9  String, Len, ToArch, and FromArch are excluded throughout (§2.7).
    10  
    11  
    12  ## Summary
    13  
    14  Heading for 100%:
    15  
    16  spec coverage, by (receiver, name) (§1)          1823 / 2929   62%  [spec-common, spec-all]
    17  docs sourced from spec (§3)                      2958 / 3206   92%  [gen-docs, comments-yaml, handwritten-fill, template-docs]
    18  
    19  Heading for zero:
    20  
    21  type mismatches with spec (§2)                      0 -> 0       [fill-enforce]
    22  type divergence across targets (§2)                 0 -> 0       [fill-enforce]
    23  spec coverage gaps in defined names (§5)            8 -> 0       [spec-all, convert-lo, mask-bits]
    24  hand-written doc conflicts with spec (§3)         164 -> 0       [doc-triage]
    25  simd mirror drift (§3)                              0 -> 0       [comments-yaml]
    26  categories.yaml entries (§4)                      229 -> 0       [cat-rehome, compiler-ops-impl, cat-delete]
    27  midway/comments.yaml entries spec covers (§4)       0 -> 0       [comments-yaml, spec-all]
    28  
    29  
    30  ## 1. Spec coverage of API   [spec-common, spec-all]
    31  
    32  by (target, receiver, name)                      3934 / 5204   76%
    33  by (receiver, name)                              1823 / 2929   62%
    34  by name                                           276 / 462    60%
    35  
    36  By build configuration:
    37  
    38    amd64                                          1737 / 2692   65%
    39    arm64                                          1099 / 1311   84%
    40    wasm                                            750 / 829    90%
    41    portable                                        348 / 372    94%
    42  
    43  By generator (declarations per tool, counted once per tool per pair):
    44  
    45    hand-written                                    502 / 561    89%
    46    midway                                          348 / 348   100%
    47    simdgen                                        1293 / 2272   57%
    48    tmplgen                                         373 / 421    89%
    49    wasmgen                                         337 / 392    86%
    50  
    51  High-drift-risk names (emitted by >1 generator):
    52  
    53    covered                                         135 / 143    94%  [spec-all]
    54    portable core (comments.yaml .common_methods)    65 / 65    100%  [spec-common]
    55  
    56  spec operations written so far                     81
    57    expanding to distinct names                     287
    58    expanding to (receiver, name) pairs            2672
    59  
    60  
    61  ## 2. Signatures and names   [named-results, fill-enforce]
    62  
    63  Spec/API disagreement, for declarations spec covers. As in specdoc.Fill,
    64  a named argument whose name differs from spec's is a mismatch; an unnamed
    65  one (or _) is not, and is counted below as a name Fill fills in instead:
    66  
    67    type mismatches                                   0 -> 0       [fill-enforce]
    68    parameter-name mismatches                         0 -> 0       [named-results]
    69    result-name mismatches                            0 -> 0       [named-results]
    70  
    71  Names spec gives that the API leaves unnamed, for declarations spec covers:
    72  
    73    declarations with unnamed parameters              0 -> 0       [named-results]
    74    declarations with unnamed results                 0 -> 0       [named-results]
    75  
    76  API consistency across targets (the "one meaning" invariant), for
    77  (receiver, name) pairs declared for more than one target. An unnamed
    78  argument agrees with any name:
    79  
    80    divergent parameter or result types               0 -> 0       [fill-enforce]
    81    divergent parameter names                         0 -> 0       [fill-enforce, spec-all]
    82    divergent result names                            0 -> 0       [named-results]
    83  
    84  
    85  ## 3. Documentation   [gen-docs, comments-yaml, handwritten-fill, template-docs]
    86  
    87  A declaration counts as sourced from spec when its doc comment begins with
    88  spec's text (a prefix test, because Fill leaves generator notes below).
    89  
    90  covered declarations whose doc comes from spec   2958 / 3206   92%  [gen-docs, comments-yaml, handwritten-fill, template-docs]
    91  
    92  simd ∩ archsimd methods with matching docs        270 / 270   100%  [gen-docs, comments-yaml]
    93  
    94  hand-written doc conflicts with spec              164 -> 0       [doc-triage]
    95      archsimd/clmul_arm64.go                         4 -> 0       [doc-triage]
    96      archsimd/extra_amd64.go                         6 -> 0       [doc-triage]
    97      archsimd/maskrange_128.go                       4 -> 0       [doc-triage]
    98      archsimd/maskrange_amd64.go                    12 -> 0       [doc-triage]
    99      archsimd/ops_emulated_amd64.go                 48 -> 0       [doc-triage]
   100      archsimd/ops_emulated_arm64.go                  1 -> 0       [doc-triage]
   101      archsimd/ops_emulated_wasm.go                  29 -> 0       [doc-triage]
   102      archsimd/shuffles_amd64.go                     12 -> 0       [doc-triage]
   103      archsimd/slicepart_128.go                       8 -> 0       [doc-triage]
   104      archsimd/slicepart_amd64.go                     4 -> 0       [doc-triage]
   105      archsimd/slicepart_arm64.go                    12 -> 0       [doc-triage]
   106      archsimd/slicepart_wasm.go                     12 -> 0       [doc-triage]
   107      simd_emulated.go                               12 -> 0       [doc-triage]
   108  drifted docs in simd mirror (stubs vs emulated)     0 -> 0       [comments-yaml]
   109    mirrored declarations                           372
   110  
   111  
   112  ## 4. Retiring the old inputs
   113     [comments-yaml, cat-rehome, compiler-ops-impl, cat-delete]
   114  
   115  categories.yaml's exported entries are emptied field by field: template-docs
   116  removes documentation, cat-rehome removes the rest, sig-from-spec removes
   117  commutative, and cat-delete removes the file. Compiler-only entries are
   118  handled wholesale by compiler-ops-impl.
   119  
   120  categories.yaml entries                           229 -> 0       [cat-rehome, compiler-ops-impl, cat-delete]
   121      unique operation names                        200
   122        exported                                    167
   123  compiler-only categories.yaml entries              42 -> 0       [compiler-ops-impl]
   124  
   125    exported entries, by field:
   126      base                                            6 -> 0       [cat-rehome]
   127      commutative                                   187 -> 0       [sig-from-spec]
   128      constImm                                       22 -> 0       [cat-rehome]
   129      documentation                                 186 -> 0       [cat-rehome]
   130      elemBits                                       14 -> 0       [cat-rehome]
   131      out                                            20 -> 0       [cat-rehome]
   132      regexpTag                                      25 -> 0       [cat-rehome]
   133      signed                                          6 -> 0       [cat-rehome]
   134  
   135  midway/comments.yaml entries spec covers            0 -> 0       [comments-yaml, spec-all]
   136  
   137  commutativity disagreements, spec vs categories.yaml     7 -> 0       [spec-all]
   138  
   139  
   140  ## 5. Spec/API coverage disagreement detail   [spec-all, convert-lo, mask-bits]
   141  
   142  Where both sides define a name, receivers only the API declares are spec
   143  bugs (a constraint is wrong or a sibling function is missing). Receivers
   144  only spec generates are a review queue -- spec is deliberately maximal.
   145  
   146  spec misses receivers of a name it defines          8 -> 0       [spec-all, convert-lo, mask-bits]
   147      declarations affected, counting each target     8 -> 0       [spec-all, convert-lo, mask-bits]
   148  spec operations implemented nowhere                 1 -> 0       [spec-all]
   149      TrailingZeros
   150  
   151  Every name either side defines, less the 186 spec has never defined at all
   152  (1098 receivers, counted as coverage in §1 rather than disagreement):
   153  
   154    relation         names  Σ|api - spec|  Σ|spec - api|
   155                                   (-> 0)       (review)
   156    api = spec         219              0              0
   157    api ⊂ spec          51              0            799
   158    api ⊃ spec           0              0              0
   159    overlapping          0              0              0
   160    disjoint             6              8             16
   161    api = ∅             11              0             34
   162    total              287              8            849
   163  
   164  Names that disagree, with api - spec receivers (the defects):
   165  
   166    name                       relation    |api| |spec| |api - spec| |spec - api|
   167    AddSaturated               api ⊂ spec     24     32            0            8
   168    Average                    api ⊂ spec     12     32            0           20
   169    CarrylessMultiplyEven      api ⊂ spec      4     16            0           12
   170    CarrylessMultiplyEvenOdd   api ⊂ spec      3     16            0           13
   171    CarrylessMultiplyOdd       api ⊂ spec      4     16            0           12
   172    CarrylessMultiplyOddEven   api ⊂ spec      3     16            0           13
   173    ConcatAddPairs             api ⊂ spec     10     40            0           30
   174    ConcatAddPairsGrouped      api ⊂ spec      6     40            0           34
   175    ConcatAddPairsSaturated    api ⊂ spec      1     32            0           31
   176    ConcatAddPairsSaturatedGrouped api ⊂ spec      1     32            0           31
   177    ConcatSubPairs             api ⊂ spec      6     40            0           34
   178    ConcatSubPairsGrouped      api ⊂ spec      6     40            0           34
   179    ConcatSubPairsSaturated    api ⊂ spec      1     32            0           31
   180    ConcatSubPairsSaturatedGrouped api ⊂ spec      1     32            0           31
   181    ConvertLo16ToFloat32       api = ∅         0      4            0            4
   182    ConvertLo2ToFloat64        api ⊂ spec      3      7            0            4
   183    ConvertLo4ToFloat32        api = ∅         0      4            0            4
   184    ConvertLo4ToFloat64        api = ∅         0      7            0            7
   185    ConvertLo8ToFloat32        api = ∅         0      4            0            4
   186    ConvertLo8ToFloat64        api = ∅         0      7            0            7
   187    ConvertToFloat32           api ⊂ spec     16     23            0            7
   188    ConvertToFloat64           api ⊂ spec     12     16            0            4
   189    ConvertToInt16             api ⊂ spec      4     26            0           22
   190    ConvertToInt32             api ⊂ spec     11     23            0           12
   191    ConvertToInt64             api ⊂ spec      9     16            0            7
   192    ConvertToInt8              api ⊂ spec      4     28            0           24
   193    ConvertToUint16            api ⊂ spec      4     26            0           22
   194    ConvertToUint32            api ⊂ spec     10     23            0           13
   195    ConvertToUint64            api ⊂ spec      9     16            0            7
   196    ConvertToUint8             api ⊂ spec      4     28            0           24
   197    Div                        api ⊂ spec     12     40            0           28
   198    DotProductPairs            api ⊂ spec      3     28            0           25
   199    DotProductPairsSaturated   api ⊂ spec      3     12            0            9
   200    ExtendLo16ToInt16          api = ∅         0      1            0            1
   201    ExtendLo16ToInt32          api = ∅         0      2            0            2
   202    ExtendLo16ToUint16         api = ∅         0      1            0            1
   203    ExtendLo16ToUint32         api = ∅         0      2            0            2
   204    ExtendLo32ToInt16          api = ∅         0      1            0            1
   205    ExtendLo32ToUint16         api = ∅         0      1            0            1
   206    ExtendLo4ToInt64           disjoint        2      3            2            3
   207        api - spec = Int16x8 Int8x16
   208    ExtendLo4ToUint64          disjoint        2      3            2            3
   209        api - spec = Uint16x8 Uint8x16
   210    ExtendLo8ToInt32           disjoint        1      2            1            2
   211        api - spec = Int8x16
   212    ExtendLo8ToInt64           disjoint        1      3            1            3
   213        api - spec = Int8x16
   214    ExtendLo8ToUint32          disjoint        1      2            1            2
   215        api - spec = Uint8x16
   216    ExtendLo8ToUint64          disjoint        1      3            1            3
   217        api - spec = Uint8x16
   218    IsNaN                      api ⊂ spec      6      8            0            2
   219    LeadingZeros               api ⊂ spec     16     32            0           16
   220    Less                       api ⊂ spec     39     40            0            1
   221    LessEqual                  api ⊂ spec     39     40            0            1
   222    MulAdd                     api ⊂ spec     22     40            0           18
   223    NotEqual                   api ⊂ spec     40     56            0           16
   224    OnesCount                  api ⊂ spec     26     32            0            6
   225    Permute                    api ⊂ spec     24     40            0           16
   226    ReduceMax                  api ⊂ spec     10     40            0           30
   227    ReduceSum                  api ⊂ spec     34     40            0            6
   228    RotateAllLeft              api ⊂ spec     13     16            0            3
   229    RotateAllRight             api ⊂ spec     13     16            0            3
   230    RotateLeft                 api ⊂ spec      6     16            0           10
   231    RotateRight                api ⊂ spec      6     16            0           10
   232    ScaleSaturated             api ⊂ spec      8     32            0           24
   233    ShiftAllLeft               api ⊂ spec     28     32            0            4
   234    ShiftAllRight              api ⊂ spec     25     32            0            7
   235    ShiftLeft                  api ⊂ spec     18     32            0           14
   236    ShiftRight                 api ⊂ spec     18     32            0           14
   237    StoreArrayMasked           api ⊂ spec     22     30            0            8
   238    SubSaturated               api ⊂ spec     24     32            0            8
   239    ToMask                     api ⊂ spec     16     40            0           24
   240    TrailingZeros              api ⊂ spec     16     32            0           16
   241  

View as plain text