Hey @friedger, great work on porting this library to Clarity 2!
I just wanted to let you know that the function inner-buff32-permutation can be removed, and replaced with a series of element-at? and replace-at? calls in reverse-buff32. This would remove the need to run 32 calls to concat. This should save you a lot of runtime, because concat-ing two sequences of lengths m and n has runtime complexity O(m + n), whereas element-at? is O(1) and replace-at? is O(s) where s is the size of one item in the sequence (for buff, s = 1).
Hey @friedger, great work on porting this library to Clarity 2!
I just wanted to let you know that the function
inner-buff32-permutation
can be removed, and replaced with a series ofelement-at?
andreplace-at?
calls inreverse-buff32
. This would remove the need to run 32 calls toconcat
. This should save you a lot of runtime, becauseconcat
-ing two sequences of lengths m and n has runtime complexity O(m + n), whereaselement-at?
is O(1) andreplace-at?
is O(s) where s is the size of one item in the sequence (forbuff
, s = 1).