We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notice that encoding is done one by one. Would it be faster if find all pieces first, then encode parallelly?
while (re2::RE2::FindAndConsume(&input, *_regex, &piece)) { auto iter = _encoder.find(piece); if (iter != _encoder.end()) { last_piece_token_len = 1; ret.push_back(iter->second); continue; } auto tokens = _byte_pair_encode(piece, _encoder); last_piece_token_len = tokens.size(); ret.insert(ret.end(), tokens.begin(), tokens.end()); }
The text was updated successfully, but these errors were encountered:
Yes, you can have a try. Put all pieces into a vector, and then run OpenMPI or TBB threads to do the encoding stuff in parallel.
Regards
Sorry, something went wrong.
No branches or pull requests
Notice that encoding is done one by one. Would it be faster if find all pieces first, then encode parallelly?
The text was updated successfully, but these errors were encountered: