14 releases

new 0.13.10-rc2 Mar 21, 2025
0.13.10-rc1 Mar 19, 2025
0.13.2-rc2 Feb 27, 2025
0.12.21 Feb 21, 2025

#25 in #compatible

Download history 100/week @ 2025-02-14 501/week @ 2025-02-21 378/week @ 2025-02-28 384/week @ 2025-03-07 209/week @ 2025-03-14

1,472 downloads per month

Apache-2.0

245KB
4.5K SLoC

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)

Dependencies

~82MB
~1.5M SLoC