use boost::regex instead of std::regex
This commit is contained in:
parent
8d1336d7df
commit
6369a38800
6 changed files with 44 additions and 16 deletions
24
test/benchmark_main.cpp
Normal file
24
test/benchmark_main.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "mstch/mstch.hpp"
|
||||
|
||||
int main() {
|
||||
std::string comment_tmp{
|
||||
"<div class=\"comments\"><h3>{{header}}</h3><ul>"
|
||||
"{{#comments}}<li class=\"comment\"><h5>{{name}}</h5>"
|
||||
"<p>{{body}}</p></li>{{/comments}}</ul></div>"
|
||||
};
|
||||
auto comment_view = mstch::object{
|
||||
{"header", std::string{"My Post Comments"}},
|
||||
{"comments", mstch::array{
|
||||
mstch::object{{"name", std::string{"Joe"}}, {"body", std::string{"Thanks for this post!"}}},
|
||||
mstch::object{{"name", std::string{"Sam"}}, {"body", std::string{"Thanks for this post!"}}},
|
||||
mstch::object{{"name", std::string{"Heather"}}, {"body", std::string{"Thanks for this post!"}}},
|
||||
mstch::object{{"name", std::string{"Kathy"}}, {"body", std::string{"Thanks for this post!"}}},
|
||||
mstch::object{{"name", std::string{"George"}}, {"body", std::string{"Thanks for this post!"}}}
|
||||
}}
|
||||
};
|
||||
|
||||
for(int i = 0; i < 5000; i++)
|
||||
mstch::render(comment_tmp, comment_view);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue