cwida / fastlanes Goto Github PK
View Code? Open in Web Editor NEWThe FastLanes Compression Layout: Decoding >100 Billion Integers per Second with Scalar Code
License: MIT License
The FastLanes Compression Layout: Decoding >100 Billion Integers per Second with Scalar Code
License: MIT License
First of all, thank you for the incredible work! I'm currently working on an implementation of FastLanes over here in Rust: https://github.com/spiraldb/fastlanes
I came across this in Section 3.1:
Fusing Bit-packing and Decoding
The 116 bit-unpacking kernels we generate for all bit-packing widths 𝑊 and unpacked type-widths 𝑇 ≤ 𝑊 could possibly be fused with the decoding kernel for DELTA, FOR, DICT and FastLanes-RLE in a single kernels that do both unpacking and decoding.
I have currently implemented BitPacking, FOR and Delta encodings. I am also able to implement a fused FOR+BitPacking. But I noticed there isn't an implementation of fused Delta+BitPacking in this repository.
My assumption is that a fused kernel is purely a runtime optimisation, meaning that the serialised bytes should remain unchanged. In other words, BitPack(Delta(Transpose(Tuples)))
== BitPack+Delta(Transpose(Tuples))
You'll have to forgive me if my understanding is wrong here, but I don't think it's possible to write this kernel in a fused way (or at least, it's very difficult?) given the current implementation of BitPacking.
Taking u16 as a concrete example.
The element iteration order within the delta encoding (unrsum) kernel (assuming a transposed input vector) is:
[
0 128 256 ... 768 896
64 192 320 ... 832 960
]
But the element iteration order for BitPacking doesn't respect the "04261537" in the same way:
[
0 64 128 ... 384 448
512 576 640 ... 896 960
]
For T=u16 and W=8, BitPacking would put elements 0 and 64 into a single packed value. But the Delta iteration order expects elements 0 and 128 to be "adjacent".
I think if BitPacking used the same iteration order as Delta, then it would be much simpler to implement fused kernels for transposed encodings, with no downside to linear encodings. Currently, given the layout of bits on disk, I think it's only really possible to implement fused kernels for linear encodings like FOR and ALP.
I may of course be completely misunderstanding this! Hopefully my question makes sense. It's quite hard to phrase things that refer to elements within transposed, folded and vectorised loops!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.