Skip to content

perf: BenchmarkFibPlaceholderRun compiles factorial.ts, not fib.ts #53

Description

@mparrett

BenchmarkFibPlaceholderRun calls compileFile(b, "scripts/factorial.ts"). The
repository also has scripts/fib.ts, which nothing benchmarks. The function's
own comment says "(currently placeholder)"; nothing downstream does.

The timed region is right and the workload is real — recursion, fused -- on a
parameter, ~5M calls per iteration, flat in b.N. The numbers are sound; only
the label is wrong.

The label misleads in practice. Anyone reasoning about what a "Fib" delta should
do reasons about the wrong source, which is how I came to attribute #43's +30.9%
to an array-index guard when factorial.ts contains no arrays (see #52).

Renaming the benchmark to what it runs costs a discontinuity in any stored
timeline keyed on the name. Pointing it at fib.ts changes the workload. I would
rename: the recursion workload is worth keeping and nothing else in the suite
covers it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions