GithubHelp home page GithubHelp logo

cwida / fastlanes Goto Github PK

View Code? Open in Web Editor NEW
129.0 6.0 6.0 17.27 MB

The FastLanes Compression Layout: Decoding >100 Billion Integers per Second with Scalar Code

License: MIT License

CMake 0.14% C++ 99.71% Shell 0.01% Python 0.01% C 0.13% Perl 0.01%

fastlanes's People

Contributors

azimafroozeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastlanes's Issues

Fused Delta+BitPacking

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.