jinja : reduce template rendering overhead (#32023)

* jinja : reduce value allocation and lookup overhead

Assisted-by: GPT-6 Astra

* jinja : address rendering review feedback

Assisted-by: GPT-6 Astra

* jinja : test multipart strings and simplify lookup

Assisted-by: GPT-6 Astra

* fix "undefined hint"

* fix divisibleby 0

* clean up

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
This commit is contained in:
HaoJun ZHANGandXuan Son Nguyen authored and GitHub committed 2026-11-14 13:34:20 +01:00
1 parent 0cce7580b8
commit 4f2187e73d
7 files changed
+408 -165

No files matched your search

+3
View File
@@ -39,6 +39,9 @@ struct string {
std::string str() const;
size_t length() const;
bool empty() const;
bool equals(const string & other) const;
std::optional<char> byte_at(size_t index) const;
void hash_update(hasher & hash) const noexcept;
bool all_parts_are_input() const;
bool is_uppercase() const;