8000 Micro-optimization for ArangoSearch executor by gnusi · Pull Request #14862 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Micro-optimization for ArangoSearch executor #14862

New issue

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

Merged
merged 4 commits into from
Oct 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix compilation
  • Loading branch information
gnusi committed Oct 4, 2021
commit 468cb41c7974262c3f3503b2f5575a5657bc59c2
24 changes: 13 additions & 11 deletions arangod/Aql/IResearchViewExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,17 +624,19 @@ bool IResearchViewExecutorBase<Impl, Traits>::writeLocalDocumentId(
ReadContext& ctx, LocalDocumentId const& documentId, LogicalCollection const& collection) {
// we will need collection Id also as View could produce documents from multiple collections
if (ADB_LIKELY(documentId.isSet())) {
// For sake of performance we store raw pointer to collection
// It is safe as pipeline work inside one process
static_assert(sizeof(void*) <= sizeof(uint64_t),
"Pointer not fits in uint64_t");
ctx.outputRow.moveValueInto(
ctx.getCollectionPointerReg(), ctx.inputRow,
AqlValueHintUInt(reinterpret_cast<uint64_t>(&collection)));

ctx.outputRow.moveValueInto(
ctx.getDocumentIdReg(), ctx.inputRow,
AqlValueHintUInt(documentId.id()));
{
// For sake of performance we store raw pointer to collection
// It is safe as pipeline work inside one process
static_assert(sizeof(void*) <= sizeof(uint64_t),
"Pointer doesn't fit uint64_t");

AqlValueHintUInt value{reinterpret_cast<uint64_t>(&collection)};
ctx.outputRow.moveValueInto(ctx.getCollectionPointerReg(), ctx.inputRow, value);
}
{
AqlValueHintUInt value{documentId.id()};
ctx.outputRow.moveValueInto(ctx.getDocumentIdReg(), ctx.inputRow, value);
}
return true;
} else {
return false;
Expand Down
0