This website requires JavaScript.
Explore
Help
Sign in
max
/
nix-super
Watch
1
Star
0
Fork
You've already forked nix-super
0
mirror of
https://github.com/privatevoid-net/nix-super.git
synced
2024-11-25 07:16:17 +02:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
1a32490aca
nix-super
/
tests
/
functional
/
lang
/
eval-okay-replacestrings.exp
2 lines
73 B
Text
Raw
Normal View
History
Unescape
Escape
primops: lazy evaluation of replaceStrings replacements The primop `builtins.replaceStrings` currently always strictly evaluates the replacement strings, however time and space are wasted for their computation if the corresponding pattern do not occur in the input string. This commit makes the evaluation of the replacement strings lazy by deferring their evaluation to when the corresponding pattern are matched and memoize the result for efficient retrieval on subsequent matches. The testcases for replaceStrings was updated to check for lazy evaluation of the replacements. A note was also added in the release notes to document the behavior change.
2023-05-25 07:37:00 +03:00
[ "faabar" "fbar" "fubar" "faboor" "fubar" "XaXbXcX" "X" "a_b" "fubar" ]
Reference in a new issue
Copy permalink