I'm writing my book on Python performance using Quarto (quarto.org/) and it's really great technical writing environment out of the box.

But beyond that, it's also extremely customizable.

Each document (an article or chapter) can be a Jupyter notebook, and I have written custom Jupyter magics that e.g. benchmark different functions and generate markdown tables of the results.

So e.g. I'd write:

```{python}
#| echo: false
%%compare_timing --measure=instructions
function1(DATA)
function2(DATA)
```

And it will benchmark both functions and render a Markdown table that shows mean elapsed time and mean CPU instructions.

Rendering the book, including running benchmarks and formatting their results, is completely automated.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/itamarst/statuses/114738946826293224 on your instance and quote it. (Note that quoting is not supported in Mastodon.)