# Highlights

> NumKong for Go

__Slice-based API.__
Plain Go slices are the input model.
__Widened outputs.__
`int8` and `float32` storage widens into safer return types.
__Packed matrix kernels.__
GEMM-like batch workloads with pack-once-reuse-many semantics via `DotsPackedMatrix`.
__Symmetric self-similarity.__
SYRK-like kernels that skip duplicate `(i, j)` and `(j, i)` work.
__MaxSim late interaction.__
ColBERT-style scoring with pre-packed queries and documents via `MaxSimPackedMatrix`.
__Binary set metrics.__
Hamming and Jaccard on packed bit vectors and set-hash vectors.
__Probability metrics.__
Kullback-Leibler divergence and Jensen-Shannon distance.
__Geospatial included.__
`HaversinesF64` and `VincentysF64` are part of the same package.
__Capability bits exposed.__
You can inspect the runtime SIMD surface from Go.

### Ecosystem Comparison

| Feature                      | NumKong                                                                                    | [GoNum][gonum]                                           |
| :--------------------------- | :----------------------------------------------------------------------------------------- | :------------------------------------------------------- |
| Operation families           | dots, distances, binary, probability, geospatial, MaxSim                                   | dots, distances, some statistics                         |
| Precision                    | BFloat16 through sub-byte; automatic widening; Kahan summation; 0 ULP in Float32/Float64   | Float64 only; standard accuracy                          |
| Runtime SIMD dispatch        | per call, the highest capability the CPU runs and the build holds, across x86, Arm, RISC-V | no runtime dispatch; some hand-written assembly routines |
| Packed matrix, GEMM-like     | pack once, reuse across query batches via `DotsPackedMatrix`                               | `mat.Dense.Mul` — no persistent packing                  |
| Symmetric kernels, SYRK-like | skips duplicate pairs, up to 2x speedup for self-distance                                  | no duplicate-pair skipping                               |
| Memory model                 | slice-based, caller-owned; cGo zero-copy pointer passing                                   | allocates internally in many functions                   |
| Host-side parallelism        | reusable `WorkerPool` for packed and symmetric batch ops                                   | partial — gonum/optimize has some parallel support       |

[gonum]: https://github.com/gonum/gonum

