You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For tracking time-to-first-X (TTFX) performance across different Julia versions and package updates, [Julia-TTFX-Snippets](https://github.com/tecosaur/Julia-TTFX-Snippets) provides a collection of TTFX workloads specifically designed for longitudinal performance testing of Julia packages.
102
+
101
103
### Other tools
102
104
103
105
Chairmarks.jl works fine for relatively short and simple blocks of code (microbenchmarking).
@@ -107,6 +109,8 @@ It allows you to label different sections of your code, then time them and displ
107
109
[BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl) is the older standard for benchmarking in Julia. It is still widely used today.
108
110
However, its default parameters run benchmarks for longer than Chairmarks, and it requires interpolating variables into the benchmarked expressions with `$`.
109
111
112
+
For command-line benchmarking outside of Julia, [hyperfine](https://github.com/sharkdp/hyperfine) is an excellent tool for timing the execution of entire Julia scripts or comparing different implementations at the process level.
113
+
110
114
Finally, if you know a loop is slow and you'll need to wait for it to be done, you can use [ProgressMeter.jl](https://github.com/timholy/ProgressMeter.jl) or [ProgressLogging.jl](https://github.com/JuliaLogging/ProgressLogging.jl) to track its progress.
111
115
112
116
## Profiling
@@ -282,6 +286,10 @@ Note that every method that is called will be compiled, no matter how far down t
282
286
To see if the intended calls were compiled correctly or diagnose other problems related to precompilation, use [SnoopCompile.jl](https://github.com/timholy/SnoopCompile.jl).
283
287
This is especially important for writers of registered Julia packages, as it allows you to diagnose recompilation that happens due to invalidation.
284
288
289
+
For alternative approaches to precompilation, [PrecompileSignatures.jl](https://github.com/rikhuijzer/PrecompileSignatures.jl) can generate precompile directives by reading method signatures, which can be especially useful when you want to ensure specific method combinations are precompiled.
290
+
291
+
For managing precompilation after Julia version updates, [PrecompileAfterUpdate.jl](https://github.com/roflmaostc/PrecompileAfterUpdate.jl) can precompile your recent environments automatically after a Julia version update, saving you time when switching between Julia versions.
292
+
285
293
### Package compilation
286
294
287
295
To reduce the time that packages take to load, you can use [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) to generate a custom version of Julia, called a sysimage, with its own standard library.
@@ -322,6 +330,8 @@ The biggest tradeoff of not compiling a sysimage, is that Julia's garbage collec
322
330
To get around this limitation, you can use static equivalents of dynamic types, such as a `StaticArray` ([StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl)) instead of an `Array` or a `StaticString` (StaticTools.jl), use `malloc` and `free` from StaticTools.jl directly, or use arena allocators with [Bumper.jl](https://github.com/MasonProtter/Bumper.jl).
323
331
The README of StaticCompiler.jl contains a more [detailed guide](https://github.com/tshort/StaticCompiler.jl?tab=readme-ov-file#guide-for-package-authors) on how to prepare code to be compiled.
324
332
333
+
For more advanced compilation workflows, [JuliaC.jl](https://github.com/JuliaLang/JuliaC.jl) provides tools for compiling and bundling Julia binaries with trimmed dependencies, particularly useful for creating minimal deployments.
Copy file name to clipboardExpand all lines: sharing/index.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,12 @@ It is a good indicator of the exhaustiveness of your test suite, albeit not suff
146
146
[Codecov](https://about.codecov.io/) is a website that provides easy visualization of this coverage, and many Julia packages use it.
147
147
It is available as a PkgTemplates.jl plugin, but you have to perform an [additional configuration step](https://docs.codecov.com/docs/adding-the-codecov-token) on the repo for Codecov to communicate with it.
148
148
149
+
\advanced{
150
+
151
+
For local coverage analysis, [LocalCoverage.jl](https://github.com/JuliaCI/LocalCoverage.jl) provides trivial functions for working with coverage locally without requiring external services.
152
+
153
+
}
154
+
149
155
## Style
150
156
151
157
To make your code easy to read, it is essential to follow a consistent set of guidelines.
@@ -203,6 +209,14 @@ Note that both Aqua.jl and JET.jl might pick up false positives: refer to their
203
209
Finally, [ExplicitImports.jl](https://github.com/ericphanson/ExplicitImports.jl) can help you get rid of generic imports to specify where each of the names in your package comes from.
204
210
This is a good practice and makes your code more robust to name conflicts between dependencies.
205
211
212
+
\advanced{
213
+
214
+
For additional code quality tools, consider [ReLint.jl](https://github.com/RelationalAI-oss/ReLint.jl), which provides another linter for Julia code with different rules and checks compared to JET.jl.
215
+
216
+
}
217
+
218
+
You can also use [pre-commit](https://github.com/pre-commit/pre-commit) to set up hooks that automatically run code quality checks before each commit, ensuring consistent code standards across your project.
219
+
206
220
## Documentation
207
221
208
222
Even if your code does everything it is supposed to, it will be useless to others (and pretty soon to yourself) without proper documentation.
@@ -268,6 +282,8 @@ Whether it is for package documentation or to write papers and books, you might
268
282
In addition to the [Pluto.jl](https://github.com/fonsp/Pluto.jl) and [Jupyter](https://jupyter.org/) notebooks, take a look at [Literate.jl](https://github.com/fredrikekre/Literate.jl) to enrich your code with comments and translate it to various formats.
269
283
[Books.jl](https://github.com/JuliaBooks/Books.jl) is relevant to draft long documents.
270
284
285
+
For enhanced Pluto.jl workflows, [PlutoPapers.jl](https://github.com/mossr/PlutoPapers.jl) provides interactive and LaTeX-styled papers directly within Pluto notebooks, bridging the gap between computational documents and publication-ready papers.
286
+
271
287
[Quarto](https://quarto.org/) is an open-source scientific and technical publishing system that supports Python, R and Julia.
272
288
Quarto can render markdown files (`.md`), Quarto markdown files (`.qmd`), and Jupyter Notebooks (`.ipynb`) into documents (Word, PDF, presentations), web pages, blog posts, books, [and more](https://quarto.org/docs/output-formats/all-formats.html).
273
289
Additionally, Quarto makes it easy to share or [publish](https://quarto.org/docs/publishing/) rendered content to Github Pages, Netlify, Confluence, Hugging Face Spaces, among others.
Copy file name to clipboardExpand all lines: writing/index.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,12 @@ julia> using Pluto
259
259
julia> Pluto.run()
260
260
```
261
261
262
+
\advanced{
263
+
264
+
For enhanced notebook-style development outside of the traditional notebook interfaces, [CodeCells.jl](https://github.com/MasonProtter/CodeCells.jl) provides code cell functionality that can be integrated into other development workflows, bridging the gap between notebook-style development and traditional script editing.
265
+
266
+
}
267
+
262
268
## Markdown
263
269
264
270
\tldr{Markdown is also a good fit for literate programming, and Quarto is an alternative to notebooks.}
0 commit comments