Skip to content

Add performance benchmark suite #38

@memburg

Description

@memburg

Summary

Create a benchmark suite to measure and track interpreter performance over time, preventing regressions as features are added.

Motivation

The interpreter already has performance optimizations (expression caching, raw statement compilation, evaluator caching), but there is no way to measure their impact or detect regressions. A benchmark suite is essential as the project grows.

Scope

  • A benchmarks/ directory with JS programs that stress different parts of the runtime
  • Categories:
    • Arithmetic loops (CPU-bound)
    • Array method chains (map/filter/reduce)
    • String operations (split/join/replace)
    • Function call overhead
    • Object property access
  • A script to run benchmarks and report timing (scripts/run_benchmarks.py or similar)
  • Optional: CI integration to detect performance regressions (compare against baseline)

Out of scope

  • Comparative benchmarking against Node.js/Deno (GiavaScript is not aiming to compete on perf)
  • Micro-benchmarking individual Crystal methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions