Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of encodeNestedLists (#453)
## Changes * Closes #46. * Improve performance of `encodeNestedLists` inside `setSubstitutionSystem$cpp.m` by not using `ReplaceRepeated`. ## Examples ```wl In[]:= rules = {{{a_, b_}, {a_, c_}, {a_, d_}} :> Module[{$0, $1, $2}, {{$0, $1}, {$1, $2}, {$2, $0}, {$0, $2}, \ {$2, $1}, {$1, $0}, {$0, b}, {$1, c}, {$2, d}, {b, $2}, {d, $0}}]}; AbsoluteTiming[set = SetReplace[{{0, 0}, {0, 0}, {0, 0}}, rules, 100]] // First AbsoluteTiming[SetReplace[set, rules]][[1]] Out[]= 0.052426 Out[]= 0.026598 ``` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/maxitg/setreplace/453) <!-- Reviewable:end -->
- Loading branch information