Skip to content

Conversation

@kivikakk
Copy link
Owner

Benchmark 1: ./bench.sh ./comrak-8d8df1ef
  Time (mean ± σ):      78.0 ms ±   0.5 ms    [User: 60.4 ms, System: 18.3 ms]
  Range (min … max):    77.1 ms …  79.0 ms    36 runs

Benchmark 2: ./bench.sh ./comrak-main
  Time (mean ± σ):      88.1 ms ±   0.7 ms    [User: 70.5 ms, System: 18.3 ms]
  Range (min … max):    87.0 ms …  89.4 ms    33 runs

Summary
  ./bench.sh ./comrak-8d8df1ef ran
    1.13 ± 0.01 times faster than ./bench.sh ./comrak-main

Yippee!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2025

Command Mean [ms] Min [ms] Max [ms] Relative
./bench.sh ./comrak-2857f3c 148.0 ± 1.0 145.4 149.4 2.53 ± 0.06
./bench.sh ./comrak-main 150.0 ± 11.2 145.0 203.2 2.57 ± 0.20
./bench.sh ./pulldown-cmark 58.5 ± 1.3 56.9 62.6 1.00
./bench.sh ./cmark-gfm 87.9 ± 7.9 80.1 103.4 1.50 ± 0.14
./bench.sh ./markdown-it 259.8 ± 2.7 253.0 265.3 4.44 ± 0.11

Run on Sat Oct 18 08:49:17 UTC 2025

We could do much better than this; I think we should be able to
periodically flush the output buffer.

Other than reading the very last byte in a few places (LF check in
output, digit check in outc), the only read of self.output is when
width>0, in which case that site becomes the place we can flush.
@kivikakk
Copy link
Owner Author

/run-bench

@kivikakk kivikakk enabled auto-merge October 18, 2025 08:43
@kivikakk kivikakk merged commit 780e886 into main Oct 18, 2025
44 checks passed
@kivikakk kivikakk deleted the push-tqmpxsvvqzvy branch October 18, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants