<feed xmlns='http://www.w3.org/2005/Atom'>
<title>askama/askama_derive/src, branch main</title>
<subtitle>added poem support</subtitle>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/'/>
<entry>
<title>Add poem integration</title>
<updated>2024-01-24T20:23:18+00:00</updated>
<author>
<name>cel 🌸</name>
<email>cel@blos.sm</email>
</author>
<published>2024-01-24T20:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=d3b048544eebf7b8402fb585b4e2531de9b28a33'/>
<id>d3b048544eebf7b8402fb585b4e2531de9b28a33</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve performance of `find_used_templates`</title>
<updated>2024-01-17T16:58:53+00:00</updated>
<author>
<name>max</name>
<email>gmx.sht@gmail.com</email>
</author>
<published>2023-12-08T12:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=2c7759c0d0534dd9903ebd97b13c4c44320a9aad'/>
<id>2c7759c0d0534dd9903ebd97b13c4c44320a9aad</id>
<content type='text'>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Deduplicating some code in `find_used_templates`</title>
<updated>2024-01-17T16:58:53+00:00</updated>
<author>
<name>max</name>
<email>gmx.sht@gmail.com</email>
</author>
<published>2023-12-08T12:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=411efb89278305a0c38f1f28924a02e03b161679'/>
<id>411efb89278305a0c38f1f28924a02e03b161679</id>
<content type='text'>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow included templates to `extend`, `import`, and `macro`</title>
<updated>2024-01-17T16:58:53+00:00</updated>
<author>
<name>max</name>
<email>gmx.sht@gmail.com</email>
</author>
<published>2023-12-11T14:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=5cad82f38e800a42717284f20e7e0923add1e32f'/>
<id>5cad82f38e800a42717284f20e7e0923add1e32f</id>
<content type='text'>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactored `match node` in `find_used_templates`</title>
<updated>2024-01-17T16:58:53+00:00</updated>
<author>
<name>max</name>
<email>gmx.sht@gmail.com</email>
</author>
<published>2023-12-11T14:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=514ae1b24cebb50cad04d0717092a9f890b7a245'/>
<id>514ae1b24cebb50cad04d0717092a9f890b7a245</id>
<content type='text'>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: max &lt;gmx.sht@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Generator: make `normalize_identifier` faster (#946)</title>
<updated>2024-01-12T19:41:46+00:00</updated>
<author>
<name>René Kijewski</name>
<email>Kijewski@users.noreply.github.com</email>
</author>
<published>2024-01-12T19:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=3cddb918897383402a58a5d74b49500571144056'/>
<id>3cddb918897383402a58a5d74b49500571144056</id>
<content type='text'>
`normalize_identifier` is called quite often in the generator, once for
every variable name or path element that is written.

This PR aims to speed up the function by

* using a per-length input string length replacement map
* binary searching the replacement map instead of a linear search

Diffent, but functionally equivalent implementations were compared:

```text
* linear search in one big map:      348.44 µs
* binary search in one big map:      334.46 µs
* linear search in a per-length map: 178.84 µs
* binary search in a per-length map: 154.54 µs
* perfect hashing:                   170.87 µs
```

The winner of this competition is "binary search in a per-length map".
It does not introduce new dependencies, but has the slight disadvantage
that it uses one instance of `unsafe` code. I deem this disadvantage
acceptable, though.

Nb. It was also tested if a variant that only stores the replaced string
would be faster. This "optimization" proved to be slower for all
implementations except "binary search in a per-length map", for which it
has the same runtime. Without a clear advantage to use the "optimized
version", I chose to use the more easy to read slice of tuples variant.

Obviously, for all measurements: YMMV.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`normalize_identifier` is called quite often in the generator, once for
every variable name or path element that is written.

This PR aims to speed up the function by

* using a per-length input string length replacement map
* binary searching the replacement map instead of a linear search

Diffent, but functionally equivalent implementations were compared:

```text
* linear search in one big map:      348.44 µs
* binary search in one big map:      334.46 µs
* linear search in a per-length map: 178.84 µs
* binary search in a per-length map: 154.54 µs
* perfect hashing:                   170.87 µs
```

The winner of this competition is "binary search in a per-length map".
It does not introduce new dependencies, but has the slight disadvantage
that it uses one instance of `unsafe` code. I deem this disadvantage
acceptable, though.

Nb. It was also tested if a variant that only stores the replaced string
would be faster. This "optimization" proved to be slower for all
implementations except "binary search in a per-length map", for which it
has the same runtime. Without a clear advantage to use the "optimized
version", I chose to use the more easy to read slice of tuples variant.

Obviously, for all measurements: YMMV.</pre>
</div>
</content>
</entry>
<entry>
<title>Add `as_ref` builtin filter</title>
<updated>2024-01-12T09:38:15+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-01-10T14:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=d5fbebecbd746e4dda0bcd81cb861b61afd8a309'/>
<id>d5fbebecbd746e4dda0bcd81cb861b61afd8a309</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add automatic borrowing to let statement"</title>
<updated>2024-01-10T09:42:31+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-01-03T14:20:50+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=1ee067f2b62a994fe1200fba8898e8909acd0ce0'/>
<id>1ee067f2b62a994fe1200fba8898e8909acd0ce0</id>
<content type='text'>
This reverts commit 3d52283b74573af509deb3c47cbabf7b7b58b1dd.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3d52283b74573af509deb3c47cbabf7b7b58b1dd.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the `markdown` filter compatible with `String`</title>
<updated>2024-01-09T20:23:47+00:00</updated>
<author>
<name>Jakub Stachurski</name>
<email>jakub@wilkuu.xyz</email>
</author>
<published>2024-01-09T16:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=50c64bc8650574d1e9243a50477eb7dbd36e36c4'/>
<id>50c64bc8650574d1e9243a50477eb7dbd36e36c4</id>
<content type='text'>
This commit solves issue #719.

This is done by making the markdown filter borrow the string and
simplifying the filter to accept `&amp;str` instead of `AsRef&lt;str&gt;`

Add test for the markdown filter using  as input

Revert markdown filter changes

Revert unnecessary changes

Improve test_markdown_owned_string test

Use cargo fmt
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit solves issue #719.

This is done by making the markdown filter borrow the string and
simplifying the filter to accept `&amp;str` instead of `AsRef&lt;str&gt;`

Add test for the markdown filter using  as input

Revert markdown filter changes

Revert unnecessary changes

Improve test_markdown_owned_string test

Use cargo fmt
</pre>
</div>
</content>
</entry>
<entry>
<title>Make API more idiomatic</title>
<updated>2023-12-18T11:01:35+00:00</updated>
<author>
<name>Dirkjan Ochtman</name>
<email>dirkjan@ochtman.nl</email>
</author>
<published>2023-12-18T10:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://bunny.garden/forks/askama/commit/?id=27b9ce2a00db1279e3d7ea3bc2dd39e3c54e72d1'/>
<id>27b9ce2a00db1279e3d7ea3bc2dd39e3c54e72d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
