Closed aidan-bailey closed 2 months ago
@aannleax informed me of the potential performance hit we'll take from compiling the same regular expression multiple times. I've found a well-used library that addresses this: regex-cache. Shall I integrate it or should we leave this optimising for future work?
@aannleax informed me of the potential performance hit we'll take from compiling the same regular expression multiple times. I've found a well-used library that addresses this: regex-cache. Shall I integrate it or should we leave this optimising for future work?
Given that the regex-cache crate basically just puts the regexes into a lru::LruCache
, and does not appear to be active (last change from 4 years ago), I don't think we should take them as a dependency. We can probably build something similar really easily, but I think a first version of this PR could also be merged without this optimisation.
Hey hey hey, it's not abandoned, it's finished 😉
Mirrors SPARQL
xsd:boolean REGEX (string literal text, simple literal pattern)
function.I think a separate function should be created for the ternary variation
xsd:boolean REGEX (string literal text, simple literal pattern, simple literal flags)
as was done forSUBSTR
andSUBSTRING
.