Skip to content

vbuild.Union: Use run length encoding when possible#6968

Merged
mattnibs merged 1 commit into
mainfrom
vbuild-union-rle
May 20, 2026
Merged

vbuild.Union: Use run length encoding when possible#6968
mattnibs merged 1 commit into
mainfrom
vbuild-union-rle

Conversation

@mattnibs
Copy link
Copy Markdown
Collaborator

No description provided.

@mattnibs mattnibs force-pushed the vbuild-union-rle branch 3 times, most recently from f233ddc to 0731ba9 Compare May 19, 2026 21:48
Copy link
Copy Markdown
Member

@nwt nwt left a comment

Choose a reason for hiding this comment

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

‎vector/vbuild/union.go appears to duplicate a lot of code from csup/union.go. Can it be shared instead?

@mattnibs
Copy link
Copy Markdown
Collaborator Author

@nwt working on that, this is the first step.

@mattnibs
Copy link
Copy Markdown
Collaborator Author

Meaning all the Builder-like code in csup is going away and is going to use vbuild instead.

Comment thread vector/vbuild/union.go Outdated
Comment thread vector/vbuild/union.go Outdated
Comment on lines +48 to +49
vecs, rle = reorderRLE(union, rle)
u.tags = concatRLEs(u.tags, rle)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is different from what's in csup/union.go:

		// RLEs have the nice property that you can just concatenate them
		// to append two vectors.
		vecs, rle = reorderRLE(union, rle)
		u.tags = append(u.tags, rle...)

Is the comment about concatenation wrong?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes it is!

@mattnibs mattnibs force-pushed the vbuild-union-rle branch from 0731ba9 to 16e7ec1 Compare May 20, 2026 18:17
Comment thread vector/vbuild/union.go Outdated
Comment thread vector/vbuild/union.go Outdated
@mattnibs mattnibs force-pushed the vbuild-union-rle branch from 16e7ec1 to ae9a33c Compare May 20, 2026 21:44
@mattnibs mattnibs merged commit 9ddded4 into main May 20, 2026
2 checks passed
@mattnibs mattnibs deleted the vbuild-union-rle branch May 20, 2026 21:47
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