Skip to content

Commit

Permalink
Micro optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
taehyounpark committed Apr 4, 2024
1 parent 9f87d92 commit 3e50466
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/queryosity/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ template <typename T> class variable {
public:
variable() = default;
template <typename U> variable(view<U> const &val);
virtual ~variable() = default;
~variable() = default;

variable(variable &&) = default;
variable &operator=(variable &&) = default;
Expand All @@ -117,7 +117,7 @@ template <typename Val> class observable {
* @brief Constructor out of a variable.
*/
observable(variable<Val> const &obs);
virtual ~observable() = default;
~observable() = default;

/**
* @brief Compute and retrieve the value of the column.
Expand Down
4 changes: 2 additions & 2 deletions include/queryosity/lazy.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,14 @@ void queryosity::lazy<Action>::merge_results() {
using result_type = decltype(model->result());
const auto nslots = this->size();
if (nslots == 1) {
this->m_result = model->result();
this->m_result = std::move(model->result());
} else {
std::vector<result_type> results;
results.reserve(nslots);
for (size_t islot = 0; islot < nslots; ++islot) {
results.push_back(std::move(this->get_slot(islot)->result()));
}
this->m_result = model->merge(results);
this->m_result = std::move(model->merge(results));
}
this->m_merged = true;
}

0 comments on commit 3e50466

Please sign in to comment.