mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
* Add many new c++ catch2 performance benchmarks. * inline splitmix64 from boost, splitmix64 is not always available in boost. fun fact, this version is ~twice as fast * reduce intensity of memory pressure test, target 200MB usage. * new bench compound; accept suggestion from code review * bench MolToCXSmiles * Update Code/Bench/stereo.cpp * impl first part of the suggestions from code reveiw * impl second part of the suggestions from code reveiw
21 lines
437 B
C++
21 lines
437 B
C++
#include <catch2/catch_all.hpp>
|
|
|
|
#include <GraphMol/ROMol.h>
|
|
#include <GraphMol/SmilesParse/SmilesParse.h>
|
|
|
|
#include "bench_common.hpp"
|
|
|
|
namespace bench_common {
|
|
|
|
std::vector<RDKit::ROMol> load_samples() {
|
|
std::vector<RDKit::ROMol> ret;
|
|
for (auto smiles : SAMPLES) {
|
|
auto mol = RDKit::v2::SmilesParse::MolFromSmiles(smiles);
|
|
REQUIRE(mol);
|
|
ret.push_back(std::move(*mol));
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
} // namespace bench_common
|