Skip to content

robscale 0.5.4

Latest

Choose a tag to compare

@davdittrich davdittrich released this 30 Mar 17:19
· 19 commits to main since this release

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. Accelerates robScale, robLoc, MAD, and ADM median dispatch.

  • Raised sort network threshold (16 → 56): Branchless sorting networks beat std::sort by 1.2–3× for n ≤ 60. Benefits Qn exact path, Sn micro-path, GMD, and IQR. 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_net beats Floyd-Rivest through n ≈ 36 for both odd and even sample sizes.

  • Earlier ensemble parallelism: TBB parallel_for now 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_avx2 now contains the vectorizable loop body directly instead of delegating via plain inline, 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_core takes an explicit use_avx2 flag. 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 configure sed delimiter collision (|!) for TBB rpath values containing |.
  • Added RcppParallel.h before system TBB headers for correct include guard ordering.
  • Added libtbb.dylib check for macOS RcppParallel TBB detection.
  • Removed TBB from SystemRequirements (provided by RcppParallel).
  • Explicit <cmath> include for portability.
  • Narrowed <immintrin.h> include guard to ROBSCALE_HAS_AVX2_DISPATCH.