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

Skip to content

Commit 3922458

Browse files
authored
Update j2_compatibility.md
1 parent 2407579 commit 3922458

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

docs/j2_compatibility.md

Lines changed: 13 additions & 14 deletions
B4CF
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,23 @@ for / endfor | <span style="color:green">yes</span> | <span
5454
recursive 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>
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

57+
### References
58+
59+
- [1]
60+
- [2]
61+
- [3]
5762

5863
## Jinja2C++ performance
5964

6065
Template | Python | Jinja2C++ (MSVC build) | Jinja2C++ (MinGW Build)
6166
----------------------------------------------------------------------------------------------------|-----------|------------------------|-------------------------
6267
'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-
68+
`{% raw %}{{ message }} from Parser!' message='Hello World!{% endraw %}` (1 mln. iterations) | 5.083 | 2.188 | 1.082
69+
`{% raw %}{{ message }} from Parser!{% endraw %}` message=100500 (1 mln. iterations) | 5.126 | 2.211 | 1.087
70+
`{% raw %}{{ message | upper }} from Parser!{% endraw %}` message='Hello World!' (1 mln. iterations) | 5.583 | 3.559 | 1.850
71+
`{% raw %}{{ message }} from Parser! - {{number}}{% endraw %}` message='Hello World!', number=100500 (1 mln. iterations)| 5.800 | 2.594 | 1.504
72+
`{% raw %}{% for i in range(20)%} {{i}} {%endfor%}{% endraw %}` (20 thsd. iterations) | 2.485 | 2.917 | 1.966
73+
`{% raw %}{% for i in range(num)%} {{i}} {%endfor%}{% endraw %}` num=20 (20 thsd. iterations) | 2.575 | 2.768 | 2.040
74+
`{% raw %}{% for i in range(20)%} {{i ~ "-" ~ loop.index}} {%endfor%}{% endraw %}` (20 thsd. iterations) | 11.720 | 6.334 | 4.340
75+
`{% raw %}{% for i in range(20) if i is odd %} {{i}} {%endfor%}{% endraw %}` (20 thsd. iterations) | 2.620 | 3.710 | 2.733
7276

73-
### References
74-
75-
- [1]
76-
- [2]
77-
- [3]

0 commit comments

Comments
 (0)
0