Skip to content

Commit

Permalink
Shorter bytecode by leveraging repeatitive patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Jul 22, 2022
1 parent db3094a commit 344bff9
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 127 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Fast integer compression/decompression via SIMD bit-packing. Port
edition = "2018"

[dependencies]
crunchy = "0.2"
unroll = "0.1"

[dev-dependencies]
rand = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion src/bitpacker1x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod scalar {

type DataType = u32;

fn set1(el: i32) -> DataType {
const fn set1(el: i32) -> DataType {
el as u32
}

Expand Down
2 changes: 1 addition & 1 deletion src/bitpacker4x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mod scalar {

type DataType = [u32; 4];

fn set1(el: i32) -> DataType {
const fn set1(el: i32) -> DataType {
[el as u32; 4]
}

Expand Down
2 changes: 1 addition & 1 deletion src/bitpacker8x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mod scalar {

type DataType = [u32; 8];

fn set1(el: i32) -> DataType {
const fn set1(el: i32) -> DataType {
[el as u32; 8]
}

Expand Down
Loading

0 comments on commit 344bff9

Please sign in to comment.