modernjuliaworkflows / modernjuliaworkflows.github.io

Blog posts on best practices for Julia development
https://modernjuliaworkflows.org/
MIT License
186 stars 18 forks source link

Content for Optimizing Page #90

Closed jacobusmmsmit closed 5 months ago

jacobusmmsmit commented 8 months ago

PR remade to avoid dealing with merge conflicts in things unrelated to new content.

This PR currently covers the basic principles of writing fast-running code (minimise allocations and ensure type stability), along with a bit of why these are the principles. As well as this, it explains how (and why) to use BenchmarkTools.

gdalle commented 6 months ago

can you fix the conflicts with main to see if it builds remotely?

jacobusmmsmit commented 6 months ago

Error comes from trying to display a static array. Weird.

gdalle commented 6 months ago

I would open a Xranklin issue?

jacobusmmsmit commented 6 months ago

It's worked for us in the past, I suppose :')

jacobusmmsmit commented 5 months ago

@gdalle @adrhill things that need to be fixed before merge:

gdalle commented 5 months ago

Macros like @benchmark have a return value and so they don't print the pretty graph when the code is run.

Maybe this here is the answer? https://franklinjl.org/code/#inserting_the_output Specifically the \show part

jacobusmmsmit commented 5 months ago

I don't know what I'm doing wrong but I can't make that work :/

Even using the example from the page I get:

┌ Warning: Command '\output' used before it was defined.
└ @ Xranklin ~/.julia/packages/Xranklin/6wt1L/src/convert/markdown/latex_objects.jl:62
gdalle commented 5 months ago

Maybe it's different in Xranklin than Franklin?

gdalle commented 5 months ago

I took care of the #hideall

gdalle commented 5 months ago

Working on the review, made my way to the end of "benchmarking"