-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.cpp
More file actions
21 lines (18 loc) · 885 Bytes
/
stats.cpp
File metadata and controls
21 lines (18 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Ivan Piardi (Faraone-Dev)
//! Rolling statistics translation unit.
//!
//! `RollingStats` is intentionally header-only — Welford's incremental
//! algorithm is a tight scalar loop the compiler inlines and vectorises
//! at the call site, so a separate .cpp would only inhibit inlining.
//!
//! A batched AVX2 kernel was prototyped but rejected: at the engine's
//! tick cadence (~50 Hz) batch size is 1, so the SIMD prologue
//! dominates over the scalar update. We measured no win on the hot
//! path. If a sub-millisecond burst statistic is ever needed, drop the
//! kernel into a new TU rather than this one.
#include "flowlab/stats.h"
namespace flowlab {
// Intentionally empty — keeps the symbol visible to the linker for
// future ABI-stable batch entry points without forcing recompilation.
} // namespace flowlab