-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently we have four uint column types; each one can be encoded with either 0,1,2,4,or 8 bytes per value. The encoding contains a delta that has the same width as the column type. This leads to a lot of possible combinations of data formats (each one requiring at least a bit of specific code, even if generated through generics). Given that the encoding supports smaller widths transparently, there is no real advantage to declaring column types for smaller integers. And there is a disadvantage - it will prevent us from using larger integers in the future without changing the type. This change replaces the four uint column types with a single type. We also add a specialization of the decoding type which is optimized for offsets. Benchmarks: ``` name time/op UnsafeUints/const-10 0.59ns ± 0% UnsafeUints/1b-10 0.70ns ± 0% UnsafeUints/1b,delta-10 0.70ns ± 1% UnsafeUints/2b-10 0.74ns ± 0% UnsafeUints/2b,delta-10 0.74ns ± 0% UnsafeUints/4b-10 0.94ns ± 0% UnsafeUints/4b,delta-10 0.94ns ± 0% UnsafeUints/8b-10 1.25ns ± 0% UnsafeOffsets/2b-10 0.51ns ± 0% UnsafeOffsets/4b-10 0.94ns ± 0% ```
- Loading branch information
1 parent
fd3044b
commit 1e5fd68
Showing
22 changed files
with
2,362 additions
and
2,864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.