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生态系统中尚无数据框实现。本文介绍了首个Mojo原生数据框库——MojoFrame,该库支持核心关系运算和用户定义函数(UDF)。MojoFrame基于Mojo张量构建,以实现数值列的高速运算,同时采用基数感知方法有效整合非数值列,实现灵活的数据表示。为实现高效率,MojoFrame采用了与现有库显著不同的技术路径。我们证明MojoFrame支持TPC-H查询的全部操作及部分TPC-DS查询,并展现出优异的性能,相较于其他编程语言的现有数据框库最高可达到4.60倍的加速比。尽管如此,MojoFrame(及Mojo语言)仍存在优化空间,特别是在内存数据表示和字典操作方面。

0
下载
关闭预览

相关内容

【CVPR2025】CoLLM:面向组合图像检索的大语言模型
专知会员服务
13+阅读 · 2025年3月26日
【CVPR2025】ProAPO: 逐步自动化提示优化用于视觉分类
专知会员服务
10+阅读 · 2025年3月1日
【AAAI2024】LAMM: 多模态提示学习的标签对齐
专知会员服务
41+阅读 · 2023年12月14日
专知会员服务
113+阅读 · 2021年9月22日
【ICML2021】具有线性复杂度的Transformer的相对位置编码
专知会员服务
25+阅读 · 2021年5月20日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
【NeurIPS2019】图变换网络:Graph Transformer Network
Shreya Gherani:BERT庖丁解牛(Neo Yan翻译)
CreateAMind
10+阅读 · 2019年8月10日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
Caffe 深度学习框架上手教程
黑龙江大学自然语言处理实验室
14+阅读 · 2016年6月12日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
18+阅读 · 2024年12月27日
A Survey of Large Language Models
Arxiv
501+阅读 · 2023年3月31日
UNITER: Learning UNiversal Image-TExt Representations
Arxiv
23+阅读 · 2019年9月25日
Deep Face Recognition: A Survey
Arxiv
18+阅读 · 2019年2月12日
VIP会员
最新内容
2025年大语言模型进展报告
专知会员服务
0+阅读 · 12分钟前
多智能体协作机制
专知会员服务
0+阅读 · 16分钟前
非对称优势:美海军开发低成本反无人机技术
专知会员服务
4+阅读 · 今天4:39
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
5+阅读 · 今天2:48
《军事模拟:将军事条令与目标融入AI智能体》
专知会员服务
8+阅读 · 今天2:43
【NTU博士论文】3D人体动作生成
专知会员服务
6+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
13+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
9+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
4+阅读 · 4月24日
相关资讯
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
【NeurIPS2019】图变换网络:Graph Transformer Network
Shreya Gherani:BERT庖丁解牛(Neo Yan翻译)
CreateAMind
10+阅读 · 2019年8月10日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
Caffe 深度学习框架上手教程
黑龙江大学自然语言处理实验室
14+阅读 · 2016年6月12日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员