Skip to content

Conversation

@jackgerrits
Copy link
Member

@jackgerrits jackgerrits commented Jun 4, 2021

Adds:

  • clear
  • Makes get_indices a constant time operation
  • get_index_for_hash

Rename:

  • index to ns_index in some places to clarify it is the 1 byte namespace index and not a size_t collection index

indices_copy.erase(last, indices_copy.end());
return indices_copy;
auto it = _hash_to_index_mapping.find(hash);
#ifndef VW_NOEXCEPT
Copy link
Collaborator

Choose a reason for hiding this comment

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

if this is used with noexcept it will fail miserably, maybe add:

#else 
 if (it == end())
    return {};

and return an empty set

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed

@jackgerrits jackgerrits enabled auto-merge (squash) June 8, 2021 17:38
@jackgerrits jackgerrits merged commit 9f37708 into VowpalWabbit:master Jun 8, 2021
@jackgerrits jackgerrits deleted the namespaced_features_update branch June 8, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants