Repository navigation
Improve the README and benchmark against Stencil, Mustache and Leaf - #16
Merged
Merged
Conversation
…at it is, why to use it and how it's benchmarked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the README was titled "StringCheese", its code samples were indented blocks with no syntax highlighting, it went straight into installation without showing what the library is for, and the Benchmarks section was one sentence with no numbers. The benchmarks package also failed to build on macOS.
After: the README is titled "String Cheese", every code block is fenced and marked
swift,jinja(templates) ortext(output), and it opens with a short description, a template, Swift and output example, a "Why String Cheese" list and a table of contents. The Benchmarks section shows measured times for String Cheese, Leaf, Mustache and Stencil on Linux and macOS, with how and where they were measured. String Cheese renders the comparison page 4 to 84 times faster than the others.How:
Benchmarks/Comparisonis a new package that renders the same page (a heading and 100 people with escaping and a condition) with each engine, checks every engine's output against String Cheese's before timing, and prints a Markdown table. A new Benchmarks workflow runs it and the existing benchmarks onubuntu-latest(Swift 6.2) andmacos-15for pull requests that touch the library or benchmarks, and can be started by hand. The README numbers come from this run.Benchmarks/Package.swiftnow declares macOS 13 so it builds on macOS.