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:
Kittywhiskers Van Gogh 2024-04-13 08:21:18 +00:00
parent 0bb188a077
commit c47e9e78ed
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
2 changed files with 0 additions and 33 deletions

View File

@ -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);

View File

@ -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