tinymist/crates/crityp
Myriad-Dreamin e584beb926
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
fix: update cargo metadata and crate release script (#2073)
This PR fixes the release script to remove the `tinymist-analysis` crate
from the release process.

This PR also fixes the `crityp` crate to include the `system` feature in
the `cli` feature.
2025-08-25 03:03:55 +08:00
..
src feat: bump edition of most crates to rust 2024 (#2042) 2025-08-18 16:48:41 +08:00
Cargo.toml fix: update cargo metadata and crate release script (#2073) 2025-08-25 03:03:55 +08:00
dist.toml feat: micro benchmark support (#1160) 2025-01-14 18:20:58 +08:00
README.md feat: micro benchmark support (#1160) 2025-01-14 18:20:58 +08:00

Crityp

Benchmark support for typst.

Usage

Use crityp to benchmark functions whose name starts with "bench" a typst file. The CLI arguments is compatible with typst-cli compile.

crityp test-bench.typ
Benchmarking /test-bench.typ@bench-fib
Benchmarking /test-bench.typ@bench-fib: Warming up for 3.0000 s
Benchmarking /test-bench.typ@bench-fib: Collecting 100 samples in estimated 5.3151 s (56k iterations)
Benchmarking /test-bench.typ@bench-fib: Analyzing
/test-bench.typ@bench-fib
                        time:   [93.919 µs 94.631 µs 95.459 µs]
                        change: [-7.2275% -5.2111% -3.4660%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) low mild
  4 (4.00%) high mild
  1 (1.00%) high severe
Benchmarking /test-bench.typ@bench-fib2 ...

The example typst file is as follows:

#let fib(n) = if n < 2 { n } else { fib(n - 1) + fib(n - 2) }
#let bench-fib() = fib(20)
#let bench-fib2() = fib(20)