构建更快的双数组Aho-Corasick自动机
Engineering faster double-array Aho-Corasick automata
AI总结:
本文针对双数组Aho-Corasick自动机(DAACs)技术分散、实现参考不足的问题,整合现有技术并提出新优化,通过实验确定最优技术组合,开发出性能更优的开源Rust库Daachorse。
摘要:
字符串多模式匹配是正则表达式、分词等文本处理应用中的基础问题。本文研究双数组Aho-Corasick自动机(DAACs)——一种用于快速执行多模式匹配的数据结构——的高效实现。通过精心设计数据结构,DAACs的实际性能得以提升,目前已有诸多实现技术被提出。DAACs存在的一个问题是相关技术思路未被整合,由于缺乏全面的描述与实验分析,工程师在实现高效DAAC时面临困难。\n 本文回顾了DAACs的实现技术并对其进行了全面阐述,同时提出了若干用于进一步提升性能的新技术。我们通过真实世界数据集开展了详尽实验,明确了实现DAACs更高性能的最优技术组合。该最优组合与当下最流行的DAACs库所采用的组合不同,这表明这些库的性能仍有进一步提升空间。基于实验分析,我们开发了一款使用DAACs实现快速多模式匹配的新型Rust库,命名为Daachorse,作为开源软件发布于https://github.com/daac-tools/daachorse。实验表明,Daachorse的性能优于其他AC自动机实现,适合作为众多应用中多模式匹配的快速替代方案。
英文摘要:
Multiple pattern matching in strings is a fundamental problem in text processing applications such as regular expressions or tokenization. This paper studies efficient implementations of double-array Aho-Corasick automata (DAACs), data structures for quickly performing the multiple pattern matching. The practical performance of DAACs is improved by carefully designing the data structure, and many implementation techniques have been proposed thus far. A problem in DAACs is that their ideas are not aggregated. Since comprehensive descriptions and experimental analyses are unavailable, engineers face difficulties in implementing an efficient DAAC. In this paper, we review implementation techniques for DAACs and provide a comprehensive description of them. We also propose several new techniques for further improvement. We conduct exhaustive experiments through real-world datasets and reveal the best combination of techniques to achieve a higher performance in DAACs. The best combination is different from those used in the most popular libraries of DAACs, which demonstrates that their performance can be further enhanced. On the basis of our experimental analysis, we developed a new Rust library for fast multiple pattern matching using DAACs, named Daachorse, as open-source software at https://github.com/daac-tools/daachorse. Experiments demonstrate that Daachorse outperforms other AC-automaton implementations, indicating its suitability as a fast alternative for multiple pattern matching in many applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。