mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
bench: drop leftover boost::lexical_cast
benches, drop header from list
`boost::lexical_cast` isn't used anywhere in Dash Core, the sole remaining use being in a benchmark, despite it no longer being used in Dash Core. Let's drop the benchmark and drop `boost/lexical_cast.hpp` from allowed Boost headers
This commit is contained in:
parent
0bb188a077
commit
c47e9e78ed
@ -7,7 +7,6 @@
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <string>
|
||||
|
||||
template <typename T>
|
||||
@ -25,21 +24,6 @@ static void int_atoi(benchmark::Bench& bench)
|
||||
});
|
||||
}
|
||||
|
||||
static void int_lexical_cast(benchmark::Bench& bench)
|
||||
{
|
||||
bench.run([&] {
|
||||
boost::lexical_cast<int>("1");
|
||||
});
|
||||
}
|
||||
|
||||
static void strings_1_lexical_cast(benchmark::Bench& bench)
|
||||
{
|
||||
int i{0};
|
||||
bench.run([&] {
|
||||
boost::lexical_cast<std::string>(++i);
|
||||
});
|
||||
}
|
||||
|
||||
static void strings_1_numberToString(benchmark::Bench& bench)
|
||||
{
|
||||
int i{0};
|
||||
@ -56,19 +40,6 @@ static void strings_1_tostring(benchmark::Bench& bench)
|
||||
});
|
||||
}
|
||||
|
||||
static void strings_2_multi_lexical_cast(benchmark::Bench& bench)
|
||||
{
|
||||
int i{0};
|
||||
bench.run([&] { static_cast<void>(
|
||||
boost::lexical_cast<std::string>(i) +
|
||||
boost::lexical_cast<std::string>(i+1) +
|
||||
boost::lexical_cast<std::string>(i+2) +
|
||||
boost::lexical_cast<std::string>(i+3) +
|
||||
boost::lexical_cast<std::string>(i+4));
|
||||
++i;
|
||||
});
|
||||
}
|
||||
|
||||
static void strings_2_multi_numberToString(benchmark::Bench& bench)
|
||||
{
|
||||
int i{0};
|
||||
@ -97,11 +68,8 @@ static void strings_2_strptintf(benchmark::Bench& bench)
|
||||
}
|
||||
|
||||
BENCHMARK(int_atoi);
|
||||
BENCHMARK(int_lexical_cast);
|
||||
BENCHMARK(strings_1_lexical_cast);
|
||||
BENCHMARK(strings_1_numberToString);
|
||||
BENCHMARK(strings_1_tostring);
|
||||
BENCHMARK(strings_2_multi_lexical_cast);
|
||||
BENCHMARK(strings_2_multi_numberToString);
|
||||
BENCHMARK(strings_2_multi_tostring);
|
||||
BENCHMARK(strings_2_strptintf);
|
||||
|
@ -53,7 +53,6 @@ EXPECTED_BOOST_INCLUDES=(
|
||||
boost/filesystem.hpp
|
||||
boost/filesystem/fstream.hpp
|
||||
boost/function.hpp
|
||||
boost/lexical_cast.hpp
|
||||
boost/multi_index/hashed_index.hpp
|
||||
boost/multi_index/ordered_index.hpp
|
||||
boost/multi_index/sequenced_index.hpp
|
||||
|
Loading…
Reference in New Issue
Block a user