Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change attempts to strike a balance between what parts of the liquid API need to be dynamic and static. This makes the assumption that all block, tag, and filter names are known statically and uses a `&'static str` to represent them. Old ``` running 6 tests test bench_parse_template ... bench: 24,715 ns/iter (+/- 1,966) test bench_parse_text ... bench: 2,610 ns/iter (+/- 248) test bench_parse_variable ... bench: 4,628 ns/iter (+/- 425) test bench_render_template ... bench: 9,049 ns/iter (+/- 598) test bench_render_text ... bench: 2,204 ns/iter (+/- 151) test bench_render_variable ... bench: 6,867 ns/iter (+/- 437) ``` New ``` running 6 tests test bench_parse_template ... bench: 22,625 ns/iter (+/- 1,986) test bench_parse_text ... bench: 826 ns/iter (+/- 58) test bench_parse_variable ... bench: 2,871 ns/iter (+/- 175) test bench_render_template ... bench: 6,938 ns/iter (+/- 614) test bench_render_text ... bench: 432 ns/iter (+/- 29) test bench_render_variable ... bench: 6,201 ns/iter (+/- 537) ``` In the long term, we want to stop cloning `LiquidOptions` on every parse and `globals` on every render. This change reduced the impact of the former. BREAKING CHANGE: The API now takes `&'static str` instead of `String` for block, tag, and filter names
- Loading branch information
Showing
15 changed files
with
83 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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