Benchmark

Markdown parsing runs once per document and is the hottest path in a build: every module doc, guide, and notebook goes through it. Inputs span a terse module doc to a long guide.

System

Benchmark suite executing on the following system:

Operating System macOS
CPU Information Apple M4 Max
Number of Available Cores 16
Available Memory 128 GB
Elixir Version 1.18.4
Erlang Version 27.3.4.15

Configuration

Benchmark suite executing with the following configuration:

:time 5 s
:parallel 1
:warmup 2 s

Statistics

Input: large (50 sections)

Run Time

Name IPS Average Deviation Median 99th %
Ast.from_markdown/1 66.86 14.96 ms ±1.36% 14.95 ms 15.61 ms

Run Time Comparison

Name IPS Slower
Ast.from_markdown/1 66.86  

Memory Usage

Name Average Factor
Ast.from_markdown/1 16.26 MB  

Input: medium (10 sections)

Run Time

Name IPS Average Deviation Median 99th %
Ast.from_markdown/1 333.78 3.00 ms ±2.13% 2.98 ms 3.21 ms

Run Time Comparison

Name IPS Slower
Ast.from_markdown/1 333.78  

Memory Usage

Name Average Factor
Ast.from_markdown/1 3.11 MB  

Input: small (1 section)

Run Time

Name IPS Average Deviation Median 99th %
Ast.from_markdown/1 3.28 K 305.16 µs ±4.67% 302.50 µs 360.60 µs

Run Time Comparison

Name IPS Slower
Ast.from_markdown/1 3.28 K  

Memory Usage

Name Average Factor
Ast.from_markdown/1 324.18 KB