TurboPFor-Integer-Compression

TurboPFor-Integer-Compression

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

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

TurboPFor整数压缩SIMD位打包变长编码Github开源项目

TurboPFor: Fastest Integer Compression</br>

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.<br> ...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)<br> 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<br>
  • #BOLD = pareto frontier.<br>
  • FP=FastPFor SC:simdcomp PC:Polycom<br>
  • TurboPForDA,TurboForDA: Direct Access is normally used when accessing few individual values.<br>
  • 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<br> "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

编辑推荐精选

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

openai-agents-python

openai-agents-python

OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。

openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。

Hunyuan3D-2

Hunyuan3D-2

高分辨率纹理 3D 资产生成

Hunyuan3D-2 是腾讯开发的用于 3D 资产生成的强大工具,支持从文本描述、单张图片或多视角图片生成 3D 模型,具备快速形状生成能力,可生成带纹理的高质量 3D 模型,适用于多个领域,为 3D 创作提供了高效解决方案。

3FS

3FS

一个具备存储、管理和客户端操作等多种功能的分布式文件系统相关项目。

3FS 是一个功能强大的分布式文件系统项目,涵盖了存储引擎、元数据管理、客户端工具等多个模块。它支持多种文件操作,如创建文件和目录、设置布局等,同时具备高效的事件循环、节点选择和协程池管理等特性。适用于需要大规模数据存储和管理的场景,能够提高系统的性能和可靠性,是分布式存储领域的优质解决方案。

下拉加载更多