Changes between Initial Version and Version 1 of Ticket #34521
- Timestamp:
- Apr 27, 2023, 1:46:24 AM (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34521 – Description
initial v1 5 5 #33474 added __slots__ to `Variable` and related classes, showing memory reductions and performance gains. 6 6 7 I propose adding __slots__ to all template Node classes to save further memory. Thisleads to about a 1% improvement in template rendering time, using this benchmark script:7 I propose adding __slots__ to more template classes to further save memory (Template, Token, Lexer, and the Node classes). This change leads to about a 1% improvement in template rendering time, using this benchmark script: 8 8 9 9 {{{ … … 24 24 }}} 25 25 26 And invoking [hyperfine](https://github.com/sharkdp/hyperfine) like so :26 And invoking [hyperfine](https://github.com/sharkdp/hyperfine) like so, with Python 3.11.2: 27 27 28 28 {{{