Tagging of generic dynamic values is important in symbolic-computation and dynamic-language systems, but the trade-offs change as machine architectures and workloads evolve. In particular, old folklore about boxed values, immediate values, and type tags must be recalibrated from time to time. We revisit the performance of badged object headers, low-bit tagging, and two NaN-boxing layouts on a range of platforms in use today, including AArch64 and x86-64 architectures from different manufacturers. The experiments isolate two distinct effects: the cost avoided by not heap-allocating common scalar values, and the cost avoided by obtaining tag information from the value word rather than by performing a heap read. The results show that several local bit operations are often cheaper than opening a heap object to obtain a tag or small value. Low-bit tagging remains the simplest and usually fastest choice for mostly symbolic workloads, while NaN-boxing is close in access cost and avoids the time and space of heap allocation for ordinary floating-point values.


翻译:对泛型动态值进行标记在符号计算和动态语言系统中至关重要,但随着机器架构和工作负载的演进,其间的权衡也在不断变化。特别是关于装箱值、立即值和类型标签的旧有经验法则需要时常重新校准。我们重新审视了带标签对象头、低位标记以及两种NaN-boxing布局在不同制造商当前使用的AArch64和x86-64等平台上的性能表现。实验隔离了两种不同效应:避免堆分配常见标量值所节省的成本,以及通过值字获取标签信息而非执行堆读取所节省的成本。结果表明,多次局部位操作的代价通常低于打开堆对象以获取标签或小值的代价。低位标记在符号计算密集型工作负载中仍是最简单且通常最快的选择,而NaN-boxing在访问成本上与之接近,且避免了普通浮点值的堆分配时间和空间开销。

0
下载
关闭预览

相关内容

监督和半监督学习下的多标签分类综述
专知会员服务
46+阅读 · 2022年8月3日
标签间相关性在多标签分类问题中的应用
人工智能前沿讲习班
23+阅读 · 2019年6月5日
一文读懂目标检测:R-CNN、Fast R-CNN、Faster R-CNN、YOLO、SSD
七月在线实验室
11+阅读 · 2018年7月18日
手把手教你用Keras进行多标签分类(附代码)
数据派THU
11+阅读 · 2018年7月17日
原创 | Attention Modeling for Targeted Sentiment
黑龙江大学自然语言处理实验室
25+阅读 · 2017年11月5日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月16日
VIP会员
最新内容
人工智能赋能战场情报:提速决策进程
专知会员服务
0+阅读 · 14分钟前
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
0+阅读 · 18分钟前
《无人地面战车(UGV)的崛起》报告
专知会员服务
7+阅读 · 7月16日
美陆军任务式指挥人工智能解决方案
专知会员服务
11+阅读 · 7月16日
相关VIP内容
监督和半监督学习下的多标签分类综述
专知会员服务
46+阅读 · 2022年8月3日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员