Files
rdkit/Code/Bench/bench_common.cpp
Andrew Dirksen abfddf2a79 add more benchmarking (#8878)
* 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
2025-11-27 17:38:24 +01:00

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