File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,21 @@ recursive for loop | <span style="color:green">yes</span> | <span
55
55
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 >
56
56
57
57
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
+
58
73
### References
59
74
60
75
- [ 1]
You can’t perform that action at this time.
0 commit comments