Mojo is an emerging programming language built on MLIR (Multi-Level Intermediate Representation) and supports JIT (Just-in-Time) compilation. It enables transparent hardware-specific optimizations (e.g., for CPUs and GPUs), while allowing users to express their logic using Python-like user-friendly syntax. Mojo has demonstrated strong performance on tensor operations; however, its capabilities for relational operations (e.g., filtering, join, and group-by aggregation) common in data science workflows, remain unexplored. To date, no dataframe implementation exists in the Mojo ecosystem. In this paper, we introduce the first Mojo-native dataframe library, called MojoFrame, that supports core relational operations and user-defined functions (UDFs). MojoFrame is built on top of Mojo's tensor to achieve fast operations on numeric columns, while utilizing a cardinality-aware approach to effectively integrate non-numeric columns for flexible data representation. To achieve high efficiency, MojoFrame takes significantly different approaches than existing libraries. We show that MojoFrame supports all operations for TPC-H queries and a selection of TPC-DS queries with promising performance, achieving up to 4.60x speedup versus existing dataframe libraries in other programming languages. Nevertheless, there remain optimization opportunities for MojoFrame (and the Mojo language), particularly in in-memory data representation and dictionary operations.


翻译:Mojo是一种新兴编程语言,构建于MLIR(多层中间表示)之上并支持JIT(即时)编译。该语言能够实现透明的硬件特定优化(例如针对CPU和GPU),同时允许用户使用类似Python的友好语法表达逻辑。尽管Mojo在张量运算中展现出强大性能,但其在数据科学工作流中常见的关联操作(如过滤、连接和分组聚合)能力仍有待探索。截至目前,Mojo生态系统中尚未存在任何数据帧实现。本文首次提出名为MojoFrame的原生Mojo数据帧库,该库支持核心关联操作与用户自定义函数。MojoFrame基于Mojo的张量机制构建,实现了数值列的高效运算,同时采用基数感知方法有效整合非数值列以实现灵活的数据表示。为达成高效率,MojoFrame采取了与现有库截然不同的技术路径。实验表明,MojoFrame可支撑TPC-H查询的全部操作及特定TPC-DS查询,性能表现优异——相较于其他编程语言的现有数据帧库,最高可实现4.60倍加速。尽管如此,MojoFrame(以及Mojo语言)在内存数据表示和字典操作方面仍存在优化空间。

0
下载
关闭预览

相关内容

MME-Survey:多模态大型语言模型评估的综合性调查
专知会员服务
43+阅读 · 2024年12月1日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
UIUC-Gargi《增强型语言模型》,64页ppt与视频
专知会员服务
37+阅读 · 2023年5月12日
Github热门图深度学习(GraphDL)源码与框架
新智元
21+阅读 · 2019年3月19日
Github项目推荐 | gensim - Python中的主题建模
AI研习社
15+阅读 · 2019年3月16日
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
福利 | 当Python遇上大数据与机器学习,入门so easy!
深度文本匹配开源工具(MatchZoo)
机器学习研究会
10+阅读 · 2017年12月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月12日
Arxiv
25+阅读 · 2023年6月23日
VIP会员
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 今天14:45
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 今天14:43
美以伊冲突:无人机与人工智能的运用
专知会员服务
4+阅读 · 今天14:31
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关资讯
Github热门图深度学习(GraphDL)源码与框架
新智元
21+阅读 · 2019年3月19日
Github项目推荐 | gensim - Python中的主题建模
AI研习社
15+阅读 · 2019年3月16日
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
福利 | 当Python遇上大数据与机器学习,入门so easy!
深度文本匹配开源工具(MatchZoo)
机器学习研究会
10+阅读 · 2017年12月5日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员