Skip to content

Conversation

@jackgerrits
Copy link
Member

No description provided.

@jackgerrits jackgerrits changed the title fix: remove v_array copy from --onethread fix: remove v_array copy from --onethread and std::function from parse_dispatch Sep 7, 2021

private:
v_array<example*> _examples;
const v_array<example*>* _examples;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why was this made a pointer? who owns the _examples memory?

Copy link
Member Author

Choose a reason for hiding this comment

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

A v_array is passed in it needs to be converted to this interface to be processed. In the past this relied on the shallow copy of the v_array to function efficiently. _examples is owned by whoever calls parse_dispatch and we are done with it by the end of the call

@jackgerrits jackgerrits merged commit 19c9ebb into VowpalWabbit:master Sep 8, 2021
@jackgerrits jackgerrits deleted the jagerrit/remove_varray_copy branch September 8, 2021 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants