Skip to content

Phase 5: no_std, parallelism, cache, benchmarks#8

Merged
gvonness-apolitical merged 7 commits intomainfrom
phase5/v1.0.0
Feb 26, 2026
Merged

Phase 5: no_std, parallelism, cache, benchmarks#8
gvonness-apolitical merged 7 commits intomainfrom
phase5/v1.0.0

Conversation

@gvonness-apolitical
Copy link
Contributor

Summary

  • Add no_std support (std default feature, alloc for heap types, BTreeMap in sparse grid, num-traits with libm)
  • Add parallel feature with rayon-based _par methods (integrate_composite_par, integrate_par, integrate_box_par, MonteCarloIntegrator::integrate_par, GaussLegendre::new_par)
  • Add cache module with LazyLock-based precomputed GL rules (GL5–GL100)
  • Add #[inline] annotations on 39 trivial getters across all rule types
  • Add comprehensive criterion benchmarks (node generation, 1D integration, cubature)
  • Rewrite README with correct examples, feature flag docs, no_std/parallel usage
  • Update lib.rs crate docs with feature table, cubature and cache examples
  • Remove ROADMAP.md (all phases complete)

Test plan

  • cargo test — 172 unit + 38 doc tests pass
  • cargo test --all-features — 179 unit + 38 doc tests pass (7 parallel tests)
  • cargo test --no-default-features — 172 unit + 37 doc tests pass
  • cargo clippy --all-features — clean
  • cargo bench --no-run — all 3 benchmark binaries compile

Three benchmark suites covering all major subsystems:
- node_generation: GL Newton/Bogaert, Golub-Welsch, Clenshaw-Curtis
- integration_1d: fixed-order, composite, GK, adaptive, tanh-sinh, oscillatory
- cubature: tensor product, sparse grid, adaptive cubature, Monte Carlo (plain/Sobol/Halton)
Gate the crate behind #![cfg_attr(not(feature = "std"), no_std)] with
alloc imports for heap types. Feature-gate std::error::Error impl.
Replace HashMap with BTreeMap in sparse_grid for no_std compatibility.
Use core:: paths for f64::consts and cmp::Ordering throughout.
Add optional `parallel` feature (requires `std`) providing:
- QuadratureRule::integrate_composite_par for parallel panel evaluation
- CubatureRule::integrate_par and integrate_box_par for parallel point evaluation
- MonteCarloIntegrator::integrate_par for parallel MC/QMC integration
- GaussLegendre::new_par for parallel node generation (Newton + Bogaert)

Sobol/Halton QMC produce identical results to sequential (deterministic).
Plain MC uses independent PRNG per chunk (statistically equivalent).
Add cache module with LazyLock-based precomputed GL rules (GL5-GL100).
Add #[inline] to 39 trivial getters across all rule types and CubatureRule.
Bump version to 1.0.0 and mark Phase 5 complete in ROADMAP.md.
Revert version to 0.1.0 (not yet released). Rewrite README with
correct API examples, feature flag documentation, no_std and parallel
usage. Update lib.rs crate docs with feature table, cubature and cache
examples. Fix ROADMAP milestone versions and test counts.
No longer needed — all phases are complete and the README documents
the current feature set.
@gvonness-apolitical gvonness-apolitical merged commit 4728097 into main Feb 26, 2026
6 checks passed
@gvonness-apolitical gvonness-apolitical deleted the phase5/v1.0.0 branch February 26, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant