Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first pass at benchmarks. need post-processing, formatting, dynamism.… #282

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

quffaro
Copy link
Member

@quffaro quffaro commented Nov 22, 2024

Need to get Cahn-Hilliard working.

@@ -0,0 +1,17 @@
# Benchmarks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed the results rather than stub

"Benchmarks" => "benchmarks.md"
#"ASCII Operators" => "ascii.md",
#"Canonical Models" => "canon.md",
#"Library Reference" => "api.md"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use draft mode in Documenter to disable running specific pages.

end
end
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabwidth!

ks = keys(benchmark_data);
open(file, "r+") do f
foreach(readlines(file)) do line
stub = filter(u -> startswith(line, "<!-- BENCHMARK:$u -->"), ks);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you use a regex to parse out the u instead of looping over the keys(benchmark_data) to do this in O(1) time instead of O(n)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regex is something like <!-- BENCHMARK:\([A-z]*\)\w+-->

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