Re: Sparse bit set data structure

Adrien Nayrat <adrien.nayrat@anayrat.info>

From: Adrien NAYRAT <adrien.nayrat@anayrat.info>
To: Heikki Linnakangas <hlinnaka@iki.fi>, Julien Rouhaud <rjuju123@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Andrey Borodin <x4mmm@yandex-team.ru>, Claudio Freire <klaussfreire@gmail.com>
Date: 2019-03-28T14:46:03Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add IntegerSet, to hold large sets of 64-bit ints efficiently.

Attachments

Hello,

According to the draw and simple8b_mode struct comment, it seems there 
is a typo:

> *      20-bit integer       20-bit integer       20-bit integer
>  * 1101 00000000000000010010 01111010000100100000 00000000000000010100
>  * ^
>  * selector
>  *
>  * The selector 1101 is 13 in decimal.  From the modes table below, we see
>  * that it means that the codeword encodes three 12-bit integers.  In decimal,
>  * those integers are 18, 500000 and 20.  Because we encode deltas rather than
>  * absolute values, the actual values that they represent are 18, 500018 and
>  * 500038.
[...]
>     {20, 3},                    /* mode 13: three 20-bit integers */


The comment should be "the codeword encodes three *20-bit* integers" ?

Patch attached.

Regards,