Released on CRAN: https://cran.r-project.org/package=robscale
Performance
-
SIMD median selection networks (AVX2): Hybrid SIMD+scalar selection networks for n = 8, 16, 32 are 23–58% faster than scalar
median_net. AcceleratesrobScale,robLoc,MAD, andADMmedian dispatch. -
Raised sort network threshold (16 → 56): Branchless sorting networks beat
std::sortby 1.2–3× for n ≤ 60. BenefitsQnexact path,Snmicro-path,GMD, andIQR. Ensemble uses a separate lower threshold (20) to avoid L1 I-cache pressure in the bootstrap hot loop. -
Raised median network threshold (16 → 36): Scalar
median_netbeats Floyd-Rivest through n ≈ 36 for both odd and even sample sizes. -
Earlier ensemble parallelism: TBB
parallel_fornow fires for all ensemble bootstrap calls with ≥ 2 cores and ≥ 16 replicates. Ensemble is 4–8× faster for n = 3–49 on multi-core machines. -
ADM AVX2 auto-vectorization restored:
adm_core_avx2now contains the vectorizable loop body directly instead of delegating via plaininline, fixing a 6–9% regression at n = 1024–4096.
Architecture
-
Dropped AVX-512 dispatch: Removed the 8-wide AVX-512 tanh path. Hierarchy is now: Apple Accelerate → glibc libmvec (AVX2) → SLEEF (AVX2) → OpenMP SIMD → scalar.
-
Runtime AVX2 dispatch for ADM:
adm_coretakes an explicituse_avx2flag. Non-AVX2 machines safely take the scalar path. -
L2 cache plausibility guard: Rejects
l2_per_core< 64 KB as implausible, falls back to 256 KB.
Build fixes
- Fixed
configuresed delimiter collision (|→!) for TBB rpath values containing|. - Added
RcppParallel.hbefore system TBB headers for correct include guard ordering. - Added
libtbb.dylibcheck for macOS RcppParallel TBB detection. - Removed
TBBfromSystemRequirements(provided by RcppParallel). - Explicit
<cmath>include for portability. - Narrowed
<immintrin.h>include guard toROBSCALE_HAS_AVX2_DISPATCH.