2017-01-03 10:08:21 +01:00
.
2017-01-02 23:30:16 +01:00
2016-09-11 16:54:02 +02:00
.
2017-01-02 23:30:16 +01:00
2015-01-03 15:30:46 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
2017-01-03 00:02:11 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
2017-01-03 00:09:12 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
2017-01-03 10:08:21 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00
.
2017-01-02 23:30:16 +01:00

TurboPFor: Fastest Integer Compression Build Status

  • TurboPFor: The new synonym for "integer compression"
  • 100% C (C++ compatible headers), w/o inline assembly
  • Usage as simple as memcpy
  • 👍 Java Critical Native Interface. Access TurboPFor incl. SIMD! from Java as fast as calling from C
  • FULL range 16/32/64 bits integer lists and Floating point
  • No other "Integer Compression" compress or decompress faster with better compression
  • Direct Access is several times faster than other libraries
  • Integrated (SIMD) differential/Zigzag encoding/decoding for sorted/unsorted integer lists
  • Compress better and faster than special binary compressors like blosc

+ **For/PFor/PForDelta** - **Novel** **"TurboPFor"** (Patched Frame-of-Reference,PFor/PForDelta) scheme with **direct access** or bulk decoding. Outstanding compression and speed. More efficient than **ANY** other fast "integer compression" scheme. - Compress 70 times faster and decompress up to 4 times faster than OptPFD - 🆕 **(2017) TurboPFor AVX2, now 50%! more faster!!!!** - 🆕 **(2017) TurboPFor Hybrid, better compression and more faster**

+ **Bit Packing** - Fastest and most efficient **"SIMD Bit Packing"** - 🆕 **(2017) TurboPack AVX2, now more faster. Decoding 10Billions intergers/seconds** - Scalar **"Bit Packing"** decoding as fast as SIMD-Packing in realistic (No "pure cache") scenarios - Bit Packing with **Direct/Random Access** without decompressing entire blocks - Access any single bit packed entry with **zero decompression** - **Direct Update** of individual bit packed entries - Reducing **Cache Pollution**

+ **Variable byte** - Scalar **"Variable Byte"** faster and more efficient than **ANY** other (incl. SIMD MaskedVByte) implementation - 🆕 **(2017) new scheme w. better compression and 30% more faster**

+ **Simple family** - **Novel** **"Variable Simple"** (incl. **RLE**) faster and more efficient than simple16, simple-8b or other "simple family" implementation

+ **Elias fano** - Fastest **"Elias Fano"** implementation w/ or w/o SIMD

+ **Transform** - Scalar & SIMD Transform: Delta, Zigzag, Transpose/Shuffle, Floating point<->Integer

+ **Inverted Index ...do less, go fast!** - Direct Access to compressed *frequency* and *position* data in inverted index with zero decompression - **Novel** **"Intersection w/ skip intervals"**, decompress the minimum necessary blocks (~10-15%)!. - **Novel** Implicit skips with zero extra overhead - **Novel** Efficient **Bidirectional** Inverted Index Architecture (forward/backwards traversal) incl. "integer compression". - more than **2000! queries per second** on GOV2 dataset (25 millions documents) on a **SINGLE** core - Revolutionary Parallel Query Processing on Multicores w/ more than **7000!!! queries/sec** on a quad core PC.
**...forget** ~~Map Reduce, Hadoop, multi-node clusters,~~ ...

Integer Compression Benchmark:

  • Realistic and practical "integer compression" benchmark with large integer arrays.
  • No PURE cache benchmark
- Synthetic data (2017):
  • Generate and test (zipfian) skewed distribution (100.000.000 integers, Block size=128/256)
    Note: Unlike general purpose compression, a small fixed size (ex. 128 integers) is in general used in "integer compression". Large blocks involved, while processing queries (inverted index, search engines, databases, graphs, in memory computing,...) need to be entirely decoded

     ./icbench -a1.5 -m0 -M255 -n100M ZIPF
    

CPU: Skylake i7-6700 w/ only 3.7GHz gcc 6.2 single thread

C Size ratio% Bits/Integer C MI/s D MI/s Name
62939886 15.7 5.04 392.67 2311.32 TurboPFor256
63392759 15.8 5.07 329.70 1608.42 TurboPFor
63392801 15.8 5.07 326.18 230.97 TurboPForDA
65060504 16.3 5.20 15.77 687.13 FP.SIMDOptPFor
65359916 16.34 5.23 7.58 609.12 PC.OptPFD
73477088 18.37 5.88 101.68 621.37 PC.Simple16
73481096 18.4 5.88 155.16 2187.15 FP.SimdFastPFor
76345136 19.1 6.11 245.21 652.78 VSimple
95915096 23.98 7.67 211.79 957.62 Simple-8b
99910930 25.0 7.99 3289.58 2968.35 TurboPackV
99910930 25.0 7.99 2122.43 2345.68 TurboPack
99910930 25.0 7.99 2105.47 2218.79 TurboFor
100332929 25.1 8.03 3580.42 2998.17 TurboPack256V
101015650 25.3 8.08 2380.40 2371.07 TurboVByte
101879302 25.5 8.15 65.16 2140.87 QMX
102074663 25.5 8.17 1427.73 1979.27 MaskedVByte
102074663 25.5 8.17 564.60 1052.28 PC.Vbyte
102083036 25.5 8.17 1300.35 1067.45 FP.VByte
112500000 28.1 9.00 381.85 3034.90 VarintG8IU
125000000 31.2 10.00 1110.68 2948.33 StreamVbyte
400000000 100.00 32.00 2240.24 2237.05 Copy
N/A N/A EliasFano

MI/s: 1.000.000 integers/second. 1000 MI/s = 4 GB/s
#BOLD = pareto frontier.
FP=FastPFor SC:simdcomp PC:Polycom
TurboPForDA,TurboForDA: Direct Access is normally used when accessing few individual values.


- Data files (2016):
  • CPU: Sandy bridge i7-2600k at 4.2GHz

  • gov2.sorted from [DocId data set](#DocId data set) Block size=128 (lz4+blosc+VSimple w/ 64Ki)

     ./icbench -fS -r gov2.sorted
    
Size Ratio % Bits/Integer C Time MI/s D Time MI/s Function
3.319.692.190 13.88 4.44 336.68 1410.74 TurboPFor
3.337.758.854 13.95 4.47 5.06 513.00 PC.OptPFD
3.357.673.495 14.04 4.49 357.77 1192.14 TurboPFor
3.501.671.314 14.64 4.68 321.45 827.01 VSimple
3.766.174.764 15.75 5.04 617.88 712.31 EliasFano
3.820.190.182 15.97 5.11 118.81 650.21 Simple16
4.521.326.518 18.90 6.05 209.17 824.26 Simple-8b
4.647.699.724 19.43 6.22 889.02 1130.50 TurboVbyte
4.683.323.301 19.58 6.27 828.97 1007.44 TurboVbyte
4.953.768.342 20.71 6.63 1766.05 1943.87 TurboPackV
4.953.768.342 20.71 6.63 1419.35 1512.86 TurboPack
5.203.353.057 21.75 6.96 1560.34 1806.60 SIMDPackD1 FPF
6.221.886.390 26.01 8.32 1666.76 1737.72 TurboFor
6.221.886.390 26.01 8.32 1660.52 565.25 TurboForDA
6.699.519.000 28.01 8.96 472.01 495.12 Vbyte FPF
6.700.989.563 28.02 8.96 728.72 991.57 MaskedVByte
7.622.896.878 31.87 10.20 208.73 1197.74 VarintG8IU
8.594.342.216 35.93 11.50 1307.22 1593.07 libfor
23.918.861.764 100.00 32.00 1456.17 1480.78 Copy
Size Ratio % Bits/Integer C Time MI/s D Time MI/s Function
3.214.763.689 13.44 4.30 339.90 837.69 VSimple 64Ki
3.958.888.197 16.55 5.30 279.19 618.60 lz4+DT 64Ki
6.074.995.117 25.40 8.13 494.70 729.97 blosc_lz4 64Ki
8.773.150.644 36.68 11.74 637.83 1301.05 blosc_lz 64Ki

Ki=1024 Integers. 64Ki = 256k bytes
"lz4+DT 64Ki" = Delta+Transpose from TurboPFor + lz4
"blosc_lz4" tested w/ lz4 compressor+vectorized shuffle

- Compressed Inverted Index Intersections with GOV2

GOV2: 426GB, 25 Millions documents, average doc. size=18k.

  • Aol query log: 18.000 queries
    ~1300 queries per second (single core)
    ~5000 queries per second (quad core)
    Ratio = 14.37% Decoded/Total Integers.

  • TREC Million Query Track (1MQT):
    ~1100 queries per second (Single core)
    ~4500 queries per second (Quad core CPU)
    Ratio = 11.59% Decoded/Total Integers.

  • Benchmarking intersections (Single core, AOL query log)
max.docid/q Time s q/s ms/q % docid found
1.000 7.88 2283.1 0.438 81
10.000 10.54 1708.5 0.585 84
ALL 13.96 1289.0 0.776 100
q/s: queries/second, ms/q:milliseconds/query
  • Benchmarking Parallel Query Processing (Quad core, AOL query log)
max.docid/q Time s q/s ms/q % docids found
1.000 2.66 6772.6 0.148 81
10.000 3.39 5307.5 0.188 84
ALL 3.57 5036.5 0.199 100
Notes:

Compile:

	git clone --recursive git://github.com/powturbo/TurboPFor.git
    cd TurboPFor
	*make*

	or

	*make AVX2=1* 

Testing:

- Synthetic data (use ZIPF parameter):
  • benchmark groups of "integer compression" functions

    ./icbench -eBENCH -a1.2 -m0 -M255 -n100M ZIPF
    ./icbench -eBITPACK/VBYTE -a1.2 -m0 -M255 -n100M ZIPF
    

Type "icbench -l1" for a list

-zipfian distribution alpha = 1.2 (Ex. -a1.0=uniform -a1.5=skewed distribution)
-number of integers = 100.000.000
-integer range from 0 to 255

  • individual function test (ex. Copy TurboPack TurboPFor)

    ./icbench -a1.5 -m0 -M255 -ecopy/turbopack/turbopfor/turbopack256v ZIPF
    
- Data files:
  • Raw 32 bits binary data file (see option "-f" for other formats)

    ./icbench file
    
  • Multiblock sorted (unique) data file like gov2 file from [DocId data set](#DocId data set)

    ./icbench -fS -r gov2.sorted
    
- Intersections:

1 - Download Gov2 (or ClueWeb09) + query files (Ex. "1mq.txt") from [DocId data set](#DocId data set)
8GB RAM required (16GB recommended for benchmarking "clueweb09" files).

2 - Create index file

    ./idxcr gov2.sorted .

create inverted index file "gov2.sorted.i" in the current directory

3 - Test intersections

    ./idxqry gov2.sorted.i 1mq.txt

run queries in file "1mq.txt" over the index of gov2 file

- Parallel Query Processing:

1 - Create partitions

    ./idxseg gov2.sorted . -26m -s8

create 8 (CPU hardware threads) partitions for a total of ~26 millions document ids

2 - Create index file for each partition

  ./idxcr gov2.sorted.s*

create inverted index file for all partitions "gov2.sorted.s00 - gov2.sorted.s07" in the current directory

3 - Intersections:

delete "idxqry.o" file and then type "make para" to compile "idxqry" w. multithreading

  ./idxqry gov2.sorted.s*.i 1mq.txt

run queries in file "1mq.txt" over the index of all gov2 partitions "gov2.sorted.s00.i - gov2.sorted.s07.i".

Function usage:

See benchmark "icbench" program for "integer compression" usage examples. In general encoding/decoding functions are of the form:

char *endptr = encode( unsigned *in, unsigned n, char *out, [unsigned start], [int b])
endptr : set by encode to the next character in "out" after the encoded buffer
in : input integer array
n : number of elements
out : pointer to output buffer
b : number of bits. Only for bit packing functions
start : previous value. Only for integrated delta encoding functions

char *endptr = decode( char *in, unsigned n, unsigned *out, [unsigned start], [int b])
endptr : set by decode to the next character in "in" after the decoded buffer
in : pointer to input buffer
n : number of elements
out : output integer array
b : number of bits. Only for bit unpacking functions
start : previous value. Only for integrated delta decoding functions

header files to use with documentation:

header file Integer Compression functions
vint.h variable byte
vsimple.h variable simple
vp4c.h, vp4d.h TurboPFor
bitpack.h bitunpack.h Bit Packing, For, +Direct Access
eliasfano.h Elias Fano

Environment:

OS/Compiler (64 bits):
  • Linux: GNU GCC (>=4.6)
  • clang (>=3.2)
  • Windows: MinGW-w64 (no parallel query processing)
Multithreading:
  • All TurboPFor integer compression functions are thread safe

References:

Last update: 03 JAN 2017

Description
No description provided
Readme GPL-2.0 6.4 MiB
Languages
C 93.1%
Rust 5.8%
Makefile 0.6%
Java 0.4%