Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Fix some dangerous code #543

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Fix some dangerous code #543

merged 1 commit into from
Aug 10, 2023

Conversation

MBkkt
Copy link
Contributor

@MBkkt MBkkt commented Aug 10, 2023

No description provided.

Copy link
Contributor

@Dronplane Dronplane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

// TODO(MBkkt) Change zero meaning
static constexpr auto kSizeMax = std::numeric_limits<size_t>::max();
static constexpr auto kDocsMax = std::numeric_limits<uint32_t>::max() - 2;
static auto ZeroMax(auto value, auto max) noexcept {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, at least, make max as real max -1 to save 1 subtraction as this is anyway deep private stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's compile time substraction

@MBkkt MBkkt merged commit 418856c into master Aug 10, 2023
2 checks passed
@MBkkt MBkkt deleted the potential-fix branch August 10, 2023 13:37
MBkkt added a commit that referenced this pull request Aug 14, 2023
MBkkt added a commit that referenced this pull request Aug 14, 2023
* Try less memory usage (#516)

* Try less memory usage

* fixes

* Update columnstore2.cpp

* Add benchmark

* Add benchmark

* Add benchmark

* Make reserve for wildcard nfa construction (#536)

* Fix burst trie UB (#537)

* Fix UB

* Hotfix for directory resource managment

* Try less memory usage (#516)

* Try less memory usage

* fixes

* Update columnstore2.cpp

* Add benchmark

* Add benchmark

* Add benchmark

* wip (#543)

* wip

* wip

* wip
MBkkt added a commit that referenced this pull request Aug 14, 2023
* Try less memory usage (#516)

* Try less memory usage

* fixes

* Update columnstore2.cpp

* Add benchmark

* Add benchmark

* Add benchmark

* Make reserve for wildcard nfa construction (#536)

* Fix burst trie UB (#537)

* Fix UB

* Hotfix for directory resource managment

* Try less memory usage (#516)

* Try less memory usage

* fixes

* Update columnstore2.cpp

* Add benchmark

* Add benchmark

* Add benchmark

* wip (#543)

* wip

* wip

* wip
@MBkkt MBkkt mentioned this pull request Aug 14, 2023
@MBkkt MBkkt mentioned this pull request Aug 14, 2023
MBkkt added a commit that referenced this pull request Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants