git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] [RFC] introduce Roaring bitmaps to Git

From
Derrick Stolee <derrickstolee@github.com>
Date
Sep 19, 2022, 18:18 UTC
Message-ID
<97a8eb90-06c2-f79e-fc9b-940ae89b88af@github.com>
In-Reply-To
<pull.1357.git.1663609659.gitgitgadget@gmail.com>
On 9/19/2022 1:47 PM, Abhradeep Chakraborty via GitGitGadget wrote:
Show 25 quoted lines
> Git currently uses ewah bitmaps ( which are based on run-length encoding) to
> compress bitmaps. Ewah bitmaps stores bitmaps in the form of run-length
> words i.e. instead of storing each and every bit, it tries to find
> consecutive bits (having same value) and replace them with the value bit and
> the range upto which the bit is present. It is simple and efficient. But one
> downside of this approach is that we have to decompress the whole bitmap in
> order to find the bit of a certain position.
> 
> For small (or medium sized) bitmaps, this is not an issue. But it can be an
> issue for large (or extra large) bitmaps. In that case roaring bitmaps are
> generally more efficient[1] than ewah itself. Some benchmarks suggests that
> roaring bitmaps give more performance benefits than ewah or any other
> similar compression technique.
> 
> This patch series is currently in RFC state and it aims to let Git use
> roaring bitmaps. As this is an RFC patch series (for now), the code are not
> fully accurate (i.e. some tests are failing). But it is backward-compatible
> (tests related to ewah bitmaps are passing). Some commit messages might need
> more explanation and some commits may need a split (specially the one that
> implement writing roaring bitmaps). Overall, the structure and code are near
> to ready to make the series a formal patch series.
> 
> I am submitting it as an RFC (after discussions with mentors) because the
> GSoC coding period is about to end. I will continue to work on the patch
> series.

I look forward to your next version. I hope to see some information about the performance characteristics across the two versions. Specifically:

1. How do various test in t/perf/ change between the two formats?
2. For certain test repos (git/git, torvalds/linux, etc.) how much does
   the .bitmap file change in size across the formats?
 
>  Makefile                   |     3 +
>  bitmap.c                   |   225 +
>  bitmap.h                   |    33 +
...
>  ewah/bitmap.c              |    61 +-
>  ewah/ewok.h                |    37 +-
...
>  roaring/roaring.c          | 20047 +++++++++++++++++++++++++++++++++++
>  roaring/roaring.h          |  1028 ++

I wonder if there is value in modifying the structure of these files into a bitmap/ directory and then perhaps ewah/ and roaring/ within each? Just a thought.

Thanks, -Stolee

Previous: Abhradeep Chakraborty via GitGitGadgetNext: Abhradeep Chakraborty
Message 22 of 25 in “[RFC] introduce Roaring bitmaps to Git”
  1. 0/5 [RFC] introduce Roaring bitmaps to GitAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  2. 1/5 reachability-bitmaps: add CRoaring library to GitAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  3. 4/5 roaring: introduce a new config option for roaring bitmapsAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  4. 2/5 roaring.[ch]: apply Git specific changes to the roaring APIAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  5. Derrick StoleeSep 19, 2022
  6. Junio C HamanoSep 19, 2022
  7. Derrick StoleeSep 20, 2022
  8. Abhradeep ChakrabortySep 20, 2022
  9. Junio C HamanoSep 21, 2022
  10. Abhradeep ChakrabortySep 20, 2022
  11. 3/5 roaring: teach Git to write roaring bitmapsAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  12. Junio C HamanoSep 30, 2022
  13. Abhradeep ChakrabortySep 30, 2022
  14. Abhradeep ChakrabortyOct 30, 2022
  15. Derrick StoleeOct 30, 2022
  16. Abhradeep ChakrabortyOct 31, 2022
  17. Junio C HamanoOct 31, 2022
  18. C99 -> C11 or C17? (was: [PATCH 3/5] roaring: teach Git to write roaring bitmaps)Ævar Arnfjörð Bjarmason, Oct 31, 2022
  19. rsbecker@nexbridge.comOct 31, 2022
  20. Abhradeep ChakrabortyNov 1, 2022
  21. 5/5 roaring: teach Git to read roaring bitmapsAbhradeep Chakraborty via GitGitGadget, Sep 19, 2022
  22. Derrick StoleeSep 19, 2022
  23. Abhradeep ChakrabortySep 20, 2022
  24. Taylor BlauSep 20, 2022
  25. Abhradeep ChakrabortySep 21, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.