Return to search

Comparing the Performance of Compiled vs Interpreted RegEx / Jämnförelse av prestandan mellan kompilerat och tolkat RegEx

The Regular Expression (RegEx) is one of the most important computer science technologies used for searching through text. Used commonly in almost every corner of computer science that is dependent on searching, it is imperative that they are made to be efficient. Usually, RegEx are implemented through the use of a process called interpretation. This thesis explores the possibility and execution time benefits of compiling the RegEx as part of the program instead of interpreting it. For this purpose, a prototype implementation was developed in the Rust programming language. Using this prototype, execution time benchmarks were performed that compare the optimised, and commonly used, interpreted variant against the thesis’ unoptimised compiled version. While the results did not determine a clear preferred method in terms of execution time, they did highlight the potential that exists in compiling RegEx. With some of the tests showing faster execution times in the prototype, there are strong arguments for future research into this field, where the compilation of RegEx can come to benefit from the optimisations present in the interpreted norm. / Regulära uttryck (EN: Regular Expression; RegEx) är en av de mest använda datalogiteknikerna för att söka igenom text. Eftersom det är använt inom många delar av datalogi så är teknikens effektivitet viktig. I norm är RegEx genomförda med en process kallad tolkning. Denna uppsats utforskar möjligheten och tidsförmåner att kompilera dessa RegEx som en del av det utomliggande programmet istället för att tolka det. För det syftet skapades en prototyp i programmeringsspråket Rust. Denna prototyp användes då för att utföra tidstest där den optimerade tolkade normen jämnfördes med avhandlingens kompilerade icke optimerade variant. De producerade resultaten visade ingen föredragen metod men betonade möjligheterna med att kompilera RegEx. Eftersom vissa av testerna visade snabbare utförande med prototypen finns det starka argument för ytterligare forskning inom detta område. På så sätt kan den kompilerade formen ta del av den utveckling som den tolkade normen redan har.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-329809
Date January 2023
CreatorsHocker, Simon, Hammarstrand, Andreas
PublisherKTH, Skolan för elektroteknik och datavetenskap (EECS), Stockholm : KTH Royal Institute of Technology
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationTRITA-EECS-EX ; 2023:432

Page generated in 0.0029 seconds