首页|期刊导航|计算机技术与发展|一种基于国产平台的Hyperscan优化方法

一种基于国产平台的Hyperscan优化方法OA

An Optimization Method of Hyperscan Based on Domestic Platform

中文摘要英文摘要

正则表达式作为文本匹配的重要工具,在网络数据处理中发挥着重要作用.然而,开源正则表达式库 Hyperscan在国产威鑫 H8000 平台上存在匹配效率低的问题,限制了其在网络数据处理中的应用.针对这一问题,提出了一种基于单指令多数据指令级优化的方法,旨在提升 Hyperscan 在威鑫 H8000 平台上的性能.优化方法首先通过分析 Hyperscan 的并行化特性,结合申威平台的性能分析工具,定位了影响匹配性能的热点函数;其次针对这些热点函数,采用手工嵌入SIMD 指令的方式,对关键函数进行优化.实验结果表明,威鑫 H8000 平台上的正则表达式匹配性能平均提升了 77%,改善了 Hyperscan 在该平台上的效率.这一优化方法不仅为 Hyperscan 在申威处理器上的性能提升提供了有效解决方案,也为国产处理器在网络数据处理领域的应用和发展提供了重要支持.

As a crucial tool for text matching,regular expressions play a significant role in the processing of network data.However,the open-source regular expression library Hyperscan exhibits relatively low matching efficiency on the Weixin H8000 platform,which limits its application in network data processing.To solve this problem,we propose a method based on single instruction multiple data instruc-tion-level optimization to enhance the matching performance of Hyperscan on the Weixin H8000 platform.The optimization method first analyzed the parallel characteristics of Hyperscan and in combination with the performance analysis tools of the Sunway platform,the hotspot functions affecting matching performance were identified.Secondly,for these hotspot functions,SIMD assembly instructions were manually embedded to optimize the key functions.Experimental results demonstrate that the regular expression matching performance on the Weixin H8000 platform has been improved by an average of 77%,significantly enhancing the efficiency of Hyperscan on this plat-form.This optimization method not only provides an effective solution for improving Hyperscan's performance on Sunway processors but also offers important support for the application and development of domestic processors in the field of network data processing.

王聪;曾安琪;季震宇;徐澍

无锡先进技术研究院,江苏 无锡 214122无锡先进技术研究院,江苏 无锡 214122无锡先进技术研究院,江苏 无锡 214122无锡先进技术研究院,江苏 无锡 214122

信息技术与安全科学

正则表达式网络数据Hyperscan单指令多数据性能分析工具热点函数汇编指令申威处理器

regular expressionnetwork dataHyperscansingle instruction multiple dataperformance analysis toolshotspot functionsas-sembly instructionsSunway processor

《计算机技术与发展》 2026 (9)

31-36,6

江苏省科技计划项目基金(SBE2023020404)

10.20165/j.cnki.ISSN1673-629X.2026.0059

评论