Changes between Initial Version and Version 1 of Ticket #34521


Ignore:
Timestamp:
Apr 27, 2023, 1:46:24 AM (20 months ago)
Author:
Adam Johnson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34521 – Description

    initial v1  
    55#33474 added __slots__ to `Variable` and related classes, showing memory reductions and performance gains.
    66
    7 I propose adding __slots__ to all template Node classes to save further memory. This leads to about a 1% improvement in template rendering time, using this benchmark script:
     7I 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:
    88
    99{{{
     
    2424}}}
    2525
    26 And invoking [hyperfine](https://github.com/sharkdp/hyperfine) like so:
     26And invoking [hyperfine](https://github.com/sharkdp/hyperfine) like so, with Python 3.11.2:
    2727
    2828{{{
Back to Top