forked from fmtlib/fmt
Use Writer instead of Formatter in the int_generator test.
This commit is contained in:
@@ -132,12 +132,13 @@ int main()
|
|||||||
util::high_resolution_timer t;
|
util::high_resolution_timer t;
|
||||||
|
|
||||||
//[karma_int_performance_format
|
//[karma_int_performance_format
|
||||||
|
fmt::Writer writer;
|
||||||
for (int i = 0; i < MAX_ITERATION; ++i)
|
for (int i = 0; i < MAX_ITERATION; ++i)
|
||||||
{
|
{
|
||||||
fmt::Formatter format;
|
writer.Clear();
|
||||||
format << v[i];
|
writer << v[i];
|
||||||
//<-
|
//<-
|
||||||
str = format.c_str(); // compensate for string ops in other benchmarks
|
str = writer.c_str(); // compensate for string ops in other benchmarks
|
||||||
//->
|
//->
|
||||||
}
|
}
|
||||||
//]
|
//]
|
||||||
|
Reference in New Issue
Block a user