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.


翻译:主流数据交换格式通过可变长度字节编码整数,或以可变长度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微秒(性能差距1675倍)。对于超过64KB的记录,解码器可实现峰值内存带宽的86%,CPU不再是瓶颈。我们还基于相同线格式构建了传输无关的RPC协议。该协议引入批量流水线机制,支持跨服务依赖调用在单次往返中完成,由服务端解析依赖关系。它无需代理即可部署于HTTP/1.1、HTTP/2及二进制传输协议,消除了限制gRPC在无服务器平台和浏览器中应用的HTTP/2要求。

0
下载
关闭预览

相关内容

论学习、公平性与复杂度
专知会员服务
11+阅读 · 2月28日
《图简化(Graph Reduction)》最新综述
专知会员服务
31+阅读 · 2024年2月10日
【ICML2021】具有线性复杂度的Transformer的相对位置编码
专知会员服务
25+阅读 · 2021年5月20日
超像素、语义分割、实例分割、全景分割 傻傻分不清?
计算机视觉life
19+阅读 · 2018年11月27日
相关性≠因果:概率图模型和do-calculus
论智
31+阅读 · 2018年10月29日
线性回归:简单线性回归详解
专知
12+阅读 · 2018年3月10日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
各种相似性度量及Python实现
机器学习算法与Python学习
11+阅读 · 2017年7月6日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月15日
Arxiv
0+阅读 · 5月12日
Arxiv
0+阅读 · 4月6日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
消耗优势:美军的“精确规模化”概念
专知会员服务
8+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
8+阅读 · 6月15日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员