arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.09591cs.DCcs.PFcs.PL
收藏

简洁性规模

Simplicity Scales

OVER3 Institute(6OVER3研究所);GoodNotes

Andrew Sampson, Yuta Saito, Ronny Chan

AI总结:

Bebop通过固定长度数据类型提升解码效率,比Protocol Buffers快9-213倍,在高维向量解码中表现优异,同时提出无代理的RPC协议,支持多种传输层。

摘要:

主流数据交换格式使用可变字节编码整数或用可变长度UTF-8字符串表示浮点数。解码器必须检查每个字节的延续位或逐个解析字符,产生数据依赖的分支,导致现代CPU流水线阻塞。Protocol Buffers在每个整数、字段标签和长度前缀上支付此成本。JSON在每个值上支付此成本。我们提出了Bebop,一种每种数据类型都使用固定字节数的序列化格式。32位整数始终是4字节。解码成为单次内存读取,无条件语句。在19个解码工作负载中,Bebop比Protocol Buffers快9-213倍。在1536维嵌入向量上,Bebop解码时间为2.8纳秒,而Protocol Buffers为111纳秒,simdjson为4.69微秒,差距达1,675倍。在超过64 KB的记录上,解码器达到86%的峰值内存带宽。CPU不再是瓶颈。我们还提出了一种基于相同线格式的传输无关RPC协议。该协议引入了批处理管道化,其中依赖的跨服务调用在单次往返中执行,服务器端依赖解析。它在HTTP/1.1、HTTP/2和二进制传输上部署,无需代理,消除了HTTP/2限制gRPC在无服务器平台和浏览器中的要求。

英文摘要:

The dominant data interchange formats encode integers using a variable number of bytes or represent floating-point numbers as variable-length UTF-8 strings. The decoder must inspect each byte for a continuation bit or parse each character individually, producing data-dependent branches that stall modern CPU pipelines. Protocol Buffers pays this cost on every integer, field tag, and length prefix. JSON pays it on every value. We present Bebop, a serialization format where every data type uses a fixed number of bytes. A 32-bit integer is always four bytes. Decoding becomes a single memory read with no conditionals. Across 19 decode workloads, Bebop decodes 9--213$\times$ faster than Protocol Buffers. On a 1536-dimension embedding vector, Bebop decodes in 2.8 nanoseconds versus 111 nanoseconds for Protocol Buffers and 4.69 microseconds for simdjson, a 1,675$\times$ gap. On records above 64 KB, the decoder achieves 86% of peak memory bandwidth. The CPU is no longer the bottleneck. We also present a transport-agnostic RPC protocol built on the same wire format. The protocol introduces batch pipelining, where dependent cross-service calls execute in a single round trip with server-side dependency resolution. It deploys over HTTP/1.1, HTTP/2, and binary transports without proxies, removing the HTTP/2 requirement that limits gRPC on serverless platforms and in browsers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑