Skip to content

Conversation

@dylon
Copy link
Collaborator

@dylon dylon commented Dec 27, 2025

Summary

Add comprehensive testing and benchmarking:

  • Benchmarks: JIT comparison, bytecode profiling, memoization
  • Examples: MeTTa samples, mmverify demos
  • Tests: Module system tests, integration fixtures
  • Scripts: PGO build, profiling scripts

This is the final PR in the series, completing the bytecode VM and JIT compiler implementation.

Part of Stacked PR Series

This is PR #28 in a 28-PR stacked series implementing the bytecode VM and JIT compiler.
Base: pr27/documentation


This PR series implements tiered compilation: tree-walker → bytecode VM → JIT native code

Merging Instructions

Merge PRs in order from #65 (pr01) to #92 (pr28). Each PR must be merged before its successor.

@dylon dylon force-pushed the pr27/documentation branch from 74e9604 to 80b79e1 Compare December 27, 2025 04:11
Adds comprehensive testing infrastructure, examples, and benchmarks:

## Benchmarks (benches/)
- `bytecode_comparison.rs`: Bytecode vs interpreter comparison
- `eval_profiling.rs`: Evaluation profiling benchmarks
- `iter_rules_bench.rs`: Rule iteration benchmarks
- `jit_comparison.rs`: JIT vs bytecode benchmarks
- `jit_optimization_benchmarks.rs`: JIT optimization microbenchmarks
- `jit_tier1_benchmarks.rs`: Tier 1 JIT benchmarks
- `memoization_benchmark.rs`: Memoization performance tests
- `mmverify_benchmark.rs`: Metamath verification benchmarks
- `mork_evaluation.rs`: MORK evaluation benchmarks
- `simd_micro.rs`: SIMD microbenchmarks
- Sample MeTTa files for benchmarks

## Examples (examples/)
- MeTTa examples: memoization, mmverify, module system
- Rust examples: backend usage, interactive REPL
- Rholang integration examples

## Tests (tests/)
- `fuzzy_match_integration.rs`: Fuzzy matching tests (641 lines)
- `module_system.rs`: Module system tests (582 lines)
- Test fixtures for module loading and package info

## Scripts (scripts/)
- `build_pgo.sh`: Profile-guided optimization build
- `profile_eval.sh`: Evaluation profiling script
- `profile_mmverify.sh`: MMVerify profiling script

## Configuration
- `.config/nextest.toml`: Test runner configuration
- `CHANGELOG.md`: Version history
- Updated tree-sitter-metta test corpus

Total: 71 files, +9,086/-70 lines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dylon dylon force-pushed the pr28/benchmarks-examples-tests branch from e6c6025 to 8d53f25 Compare December 27, 2025 04:15
dylon and others added 2 commits December 27, 2025 18:37
- Fix absurd_extreme_comparisons: >= u16::MAX → == u16::MAX
- Add #[allow(clippy::approx_constant)] to tests using 3.14
- Add #[allow(clippy::field_reassign_with_default)] to test
- Fix clippy::useless_vec: vec![...] → array literal
- Fix clippy::redundant_closure: |i| F(i) → F
- Fix clippy::get_first: args.get(0) → args.first()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The PGO (Profile-Guided Optimization) section was accidentally removed
during previous formatting fixes. This restores the build instructions
for 20%+ performance improvement on heavy workloads.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

2 participants