8000 Update j2_compatibility.md · jinja2cpp/jinja2cpp.github.io@bd29974 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd29974

Browse files
authored
Update j2_compatibility.md
1 parent 0d85e93 commit bd29974

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/j2_compatibility.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ recursive for loop | <span style="color:green">yes</span> | <span
5555
conditional for loop | <span style="color:green">yes</span> | <span style="color:red">no</span> | <span style="color:red">no</span> | <span style="color:green">yes</span>
5656

5757

58+
## Jinja2C++ performance
59+
60+
Шаблон | Python | Jinja2C++ (MSVC build) | Jinja2C++ (MinGW Build)
61+
----------------------------------------------------------------------------------------------------|-----------|------------------------|-------------------------
62+
'Hello World from Parser!' (1 mln. iterations) | 4.333 sec | 1.883 sec | 0.831 sec
63+
'{{ message }} from Parser!' message='Hello World!' (1 mln. iterations) | 5.083 | 2.188 | 1.082
64+
'{{ message }} from Parser!' message=100500 (1 mln. iterations) | 5.126 | 2.211 | 1.087
65+
'{{ message | upper }} from Parser!' message='Hello World!' (1 mln. iterations) | 5.583 | 3.559 | 1.850
66+
'{{ message }} from Parser! - {{number}}' message='Hello World!', number=100500 (1 mln. iterations)| 5.800 | 2.594 | 1.504
67+
'{% for i in range(20)%} {{i}} {%endfor%}' (20 thsd. iterations) | 2.485 | 2.917 | 1.966
68+
'{% for i in range(num)%} {{i}} {%endfor%}' num=20 (20 thsd. iterations) | 2.575 | 2.768 | 2.040
69+
'{% for i in range(20)%} {{i ~ "-" ~ loop.index}} {%endfor%}' (20 thsd. iterations) | 11.720 | 6.334 | 4.340
70+
'{% for i in range(20) if i is odd %} {{i}} {%endfor%}' (20 thsd. iterations) | 2.620 | 3.710 | 2.733
71+
72+
5873
### References
5974

6075
- [1]

0 commit comments

Comments
 (0)
0