基于musl libc库的RVV优化
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:


RVV Optimization Based on musl libc Library
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 增强出版
  • |
  • 文章评论
    摘要:

    musl libc是一个轻量级的标准C库, 其代码库小巧, 提供了全面的POSIX接口支持, 具有高度可移植性并支持多种架构和操作系统, 被广泛用于嵌入式系统、网络服务器、容器等领域. RISC-V指令集作为一种开源的指令集, 目前发布了相对稳定的SIMD指令集, RISC-V生态软件环境也迎来了新的优化热潮, 但是对于musl libc库RVV扩展优化还是一片空白. 本文立足于musl libc基础库和RISC-V RVV扩展指令集的协同研究点, 提出了兼容基础指令集和向量扩展指令集的实现方案, 利用向量扩展指令集优化了常见的C库函数strlen和memset, 并在gem5模拟器上进行了对比分析, 实验结果表明, 相较于C语言实现, 在性能方面, 利用RVV优化的strlen函数平均提升83%–703%, memset函数平均提升85%–334%.

    Abstract:

    As a lightweight standard C library, musl libc features a small code base providing comprehensive POSIX interface support, and high portability and support for various architectures and operating systems. It is widely employed in embedded systems, Web servers, containers, and other fields. RISC-V instruction set is an open source instruction set that has released the relatively stable SIMD instruction set at present. Meanwhile, the RISC-V ecological software environment has ushered in a new optimization boom, but the RVV extension optimization of the musl libc library is still a research gap. Based on the collaborative research of the musl libc basic library and RISC-V RVV extended instruction set, this study proposes an implementation scheme compatible with the basic instruction set and vector extended instruction set. The common C library functions strlen and memset are optimized by the vector extended instruction set, and comparative analysis is carried out on gem5 simulator. The experimental results show that compared with the implementation of C language, the performance of strlen function optimized by RVV is improved by 83%–703% on average, and that of memset function is improved by 85%–334% on average.

    参考文献
    相似文献
    引证文献
引用本文

张飞,于佳耕,邢明杰,武延军.基于musl libc库的RVV优化.计算机系统应用,2023,32(11):29-35

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-05-26
  • 最后修改日期:2023-06-27
  • 录用日期:
  • 在线发布日期: 2023-09-21
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号