Algebraic data types (ADTs) decouple the logical structure of data from physical layout choices that affect performance. For example, packing small fields into a word improves spatial locality, while storing co-accessed fields contiguously can enable vectorization. Such choices reinforce or undermine one another, with ramifications for compiler optimizations and memory management. Their interplay creates a combinatorial space of layouts with different runtime costs and memory footprints. The most favorable layout depends on the program's construction and destruction patterns, the characteristics of input data, and the target machine. Exploring this space requires control over layout decisions and a way to compose them while preserving program semantics. We provide both through rewrite rules over layouts, independent of any particular source language or bit-level encoding. Starting from a canonical layout derived from the ADT, these rules transform its representation while leaving the source program intact. We identify a local refinement criterion for proving each rewrite rule correct, so that layouts continue to represent every value and keep distinct values apart. Adding a new rule therefore only requires a proof satisfying this local criterion. We realize these rules in Isomer, a new pure functional programming language whose compiler specializes construction, pattern matching, and memory management to the chosen layouts. Using a default layout for all ADTs, Isomer achieves competitive performance against established functional compilers that automatically select layouts. Our rewrites further improve performance by tailoring layouts to each workload, permitting representations that prior work cannot attain or can only achieve through explicit changes to the source code.


翻译:暂无翻译

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
ICLR 2026 | DataMind: 构建通用数据分析智能体
专知会员服务
16+阅读 · 3月29日
AAAI2025|TrustUQA:统一结构化数据问答的可信框架
专知会员服务
20+阅读 · 2024年12月20日
基于深度元学习的因果推断新方法
图与推荐
12+阅读 · 2020年7月21日
一文教你如何处理不平衡数据集(附代码)
大数据文摘
12+阅读 · 2019年6月2日
【资源】图像分割/显著性检测数据集列表
专知
13+阅读 · 2019年5月22日
非平衡数据集 focal loss 多类分类
AI研习社
33+阅读 · 2019年4月23日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
统计学常用数据类型
论智
19+阅读 · 2018年7月6日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 11月15日
Arxiv
0+阅读 · 11月11日
A Survey on Data Augmentation for Text Classification
VIP会员
最新内容
乌克兰无人机饱和战场中的错误教训
专知会员服务
13+阅读 · 11月17日
面向最后一战术英里:美军无人机创新尝试
专知会员服务
9+阅读 · 11月17日
《美空军2026条令文件:对海压制作战》
专知会员服务
29+阅读 · 11月9日
人工智能与战争的未来
专知会员服务
11+阅读 · 11月8日
《Agent Mosaic:识别智能体LLM系统中的机密泄露》
专知会员服务
14+阅读 · 11月8日
人工智能在军事教育中的应用:若干视角与经验
专知会员服务
14+阅读 · 11月6日
相关VIP内容
ICLR 2026 | DataMind: 构建通用数据分析智能体
专知会员服务
16+阅读 · 3月29日
AAAI2025|TrustUQA:统一结构化数据问答的可信框架
专知会员服务
20+阅读 · 2024年12月20日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员