Project Icon

TurboPFor-Integer-Compression

多算法整数压缩库 支持跨平台和SIMD优化

TurboPFor是一款开源的整数压缩库,实现了PFor、位打包、变长字节编码等多种压缩算法。该库支持AMD/Intel、ARM和Power等主流架构,提供Rust和Java语言绑定。TurboPFor在压缩率和速度方面表现优异,支持直接访问压缩数据,并集成SIMD优化。此外,它还具备浮点数和时间序列压缩功能,是整数压缩领域的高效解决方案。

TurboPFor: Fastest Integer Compression

Build ubuntu

  • TurboPFor: The synonym for "integer compression"
    • ALL functions available for AMD/Intel, 64 bits ARMv8 NEON Linux+MacOS/M1 & Power9 Altivec
    • 100% C (C++ headers), as simple as memcpy. OS:Linux amd64, arm64, Power9, MacOs (Amd/intel + Apple M1),
    • :new:(2023.04) Rust Bindings. Access TurboPFor incl. SSE/AVX2/Neon! from Rust
    • :+1: Java Critical Natives/JNI. Access TurboPFor incl. SSE/AVX2/Neon! from Java as fast as calling from C
    • :sparkles: FULL range 8/16/32/64 bits scalar + 16/32/64 bits SIMD functions
    • No other "Integer Compression" compress/decompress faster
    • :sparkles: Direct Access, integrated (SIMD/AVX2) FOR/delta/Delta of Delta/Zigzag for sorted/unsorted arrays
  • For/PFor/PForDelta
    • Novel TurboPFor (PFor/PForDelta) scheme w./ direct access + SIMD/AVX2. +RLE
    • Outstanding compression/speed. More efficient than ANY other fast "integer compression" scheme.
  • Bit Packing
    • Fastest and most efficient "SIMD Bit Packing" >20 Billions integers/sec (80Gb/s!)
    • Extremely fast scalar "Bit Packing"
    • Direct/Random Access : Access any single bit packed entry with zero decompression
  • Variable byte
    • Scalar "Variable Byte" faster and more efficient than ANY other implementation
    • SIMD TurboByte fastest group varint (16+32 bits) incl. integrated delta,zigzag,xor,...
    • :new:(2023.03)TurboBitByte novel hybrid scheme combining the fastest SIMD codecs TurboByte+TurboPack. Compress considerably better and can be 3 times faster than streamvbyte
  • Simple family
    • Novel "Variable Simple" (incl. RLE) faster and more efficient than simple16, simple-8b
  • Elias fano
    • Fastest "Elias Fano" implementation w/ or w/o SIMD/AVX2
  • :new:(2023.03)TurboVLC novel variable length encoding for large integers with exponent + variable bit mantissa
  • :new:(2023.03)Binary interpolative coding : fastest implementation
  • Transform
    • Scalar & SIMD Transform: Delta, Zigzag, Zigzag of delta, XOR,
    • :new:(2023.03) Transpose/Shuffle with integrated Xor and zigzag delta
    • :new:(2023.03) 2D/3D/4D transpose
    • lossy floating point compression with TurboPFor or TurboTranspose+lz77/bwt
  • :new:(2023.03)IC Codecs transpose/rle + general purpose compression with lz4,zstd,turborc (range coder),bwt...
  • Floating Point Compression
    • Delta/Zigzag + improved gorilla style + (Differential) Finite Context Method FCM/DFCM floating point compression
    • Using TurboPFor, unsurpassed compression and more than 8 GB/s throughput
    • Point wise relative error bound lossy floating point compression
    • TurboFloat novel efficient floating point compression using TurboPFor
    • :new:(2023.03)TurboFloat LzXor novel floating point lempel-ziv compression
    • :new:(2023.06) _Float16 16 bits floating point support
    • :new:(2023.06) float 16/32/64 bits quantization with variable quantization bit size.
  • Time Series Compression
    • Fastest Gorilla 16/32/64 bits style compression (zigzag of delta + RLE).
    • can compress timestamps to only 0.01%. Speed > 10 GB/s compression and > 13 GB/s decompress.
  • Inverted Index ...do less, go fast!
    • Direct Access to compressed frequency and position data w/ 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
    • :sparkles: Revolutionary Parallel Query Processing on Multicores > 7000!!! queries/sec on a simple quad core PC.
      ...forget Map Reduce, Hadoop, multi-node clusters, ...

Promo video

Integer Compression Benchmark (single thread):

- Synthetic data:
  • 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.

     ./icapp -a1.5 -m0 -M255 -n100M ZIPF
    
C Sizeratio%Bits/IntegerC MB/sD MB/sName 2019.11
62,939,88615.75.04236910950TurboPFor256
63,392,75915.85.0713597803TurboPFor128
63,392,80115.85.071328924TurboPForDA
65,060,50416.35.20602748FP_SIMDOptPFor
65,359,91616.35.23322436PC_OptPFD
73,477,08818.45.884082484PC_Simple16
73,481,09618.45.886248748FP_SimdFastPFor 64Ki *
76,345,13619.16.1110722878VSimple
91,947,53323.07.3628411737QMX 64k *
93,285,86423.37.46156810232FP_GroupSimple 64Ki *
95,915,09624.07.678483832Simple-8b
99,910,93025.07.991729812408TurboByte+TurboPack
99,910,93025.07.991735712363TurboPackV sse
99,910,93025.07.991169410138TurboPack scalar
99,910,93025.07.9984208876TurboFor
100,332,92925.18.031707711170TurboPack256V avx2
101,015,65025.38.081119110333TurboVByte
102,074,66325.58.1766899524MaskedVByte
102,074,66325.58.1722604208PC_Vbyte
102,083,03625.58.1752004268FP_VByte
112,500,00028.19.00152812140VarintG8IU
125,000,00031.210.001303912366TurboByte
125,000,00031.210.001119711984StreamVbyte 2019
400,000,000100.0032.0089608948Copy
N/AN/AEliasFano

(*) codecs inefficient for small block sizes are tested with 64Ki integers/block.

  • MB/s: 1.000.000 bytes/second. 1000 MB/s = 1 GB/s
  • #BOLD = pareto frontier.
  • FP=FastPFor SC:simdcomp PC:Polycom
  • TurboPForDA,TurboForDA: Direct Access is normally used when accessing few individual values.
  • Eliasfano can be directly used only for increasing sequences

- Data files:

Speed/Ratio

SizeRatio %Bits/IntegerC Time MB/sD Time MB/sFunction 2019.11
3,321,663,89313.94.4413206088TurboPFor
3,339,730,55714.04.47322144PC.OptPFD
3,350,717,95914.04.4815367128TurboPFor256
3,501,671,31414.64.68562840VSimple
3,768,146,46715.85.0432283652EliasFanoV
3,822,161,88516.05.115722444PC_Simple16
4,411,714,93618.45.90930410444TurboByte+TurboPack
4,521,326,51818.96.058363296Simple-8b
4,649,671,42719.46.2230843848TurboVbyte
4,955,740,04520.76.63706410268TurboPackV
4,955,740,04520.76.6357248020TurboPack
5,205,324,76021.86.9669529488SC_SIMDPack128
5,393,769,50322.57.211446611902TurboPackV256
6,221,886,39026.08.3266686952TurboFor
6,221,886,39026.08.3266442260TurboForDA
6,699,519,00028.08.9618881980FP_Vbyte
6,700,989,56328.08.9627403384MaskedVByte
7,622,896,87831.910.208364792VarintG8IU
8,060,125,03533.711.5084569476Streamvbyte 2019
8,594,342,21635.911.5052286376libfor
23,918,861,764100.032.0058245924Copy

Block size: 64Ki = 256k bytes. Ki=1024 Integers

SizeRatio %Bits/IntegerC Time MB/sD Time MB/sFunction
3,164,940,56213.24.2313446004TurboPFor 64Ki
3,273,213,46413.74.3814967008TurboPFor256 64Ki
3,965,982,95416.65.3015202452lz4+DT 64Ki
4,234,154,42717.75.664365672qmx 64Ki
6,074,995,11725.48.1319762916blosc_lz4 64Ki
8,773,150,64436.711.7425485204blosc_lz 64Ki

"lz4+DT 64Ki" = Delta+Transpose from TurboPFor + lz4
"blosc_lz4" internal lz4 compressor+vectorized shuffle

- Time Series:
FunctionC MB/ssizeratio%D MB/sText
bvzenc321063245,9090.00812823ZigZag
bvzzenc32891456,7130.01013499ZigZag Delta of delta
vsenc3212294140,4000.024
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号