Skip to content

Commit

Permalink
Merge pull request #6381 from johnhyde/i/6380/fix-sane-memory-usage
Browse files Browse the repository at this point in the history
hoon: make sane memory-efficient for large atoms
  • Loading branch information
jalehman committed Mar 13, 2023
2 parents 68268c9 + aa6d6b1 commit 8e3ca9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/solid.pill
Git LFS file not shown
17 changes: 12 additions & 5 deletions pkg/arvo/sys/hoon.hoon
Expand Up @@ -4217,12 +4217,19 @@
$(inx +(inx))
==
|- ^- ?
?: =(0 b) &
=+ cur=(end 3 b)
?: =(inx len) &
=+ cur=(cut 3 [inx 1] b)
?: &((lth cur 32) !=(10 cur)) |
=+ len=(teff cur)
?& |(=(1 len) =+(i=1 |-(|(=(i len) &((gte (cut 3 [i 1] b) 128) $(i +(i)))))))
$(b (rsh [3 len] b))
=+ tef=(teff cur)
?& ?| =(1 tef)
=+ i=1
|- ^- ?
?|
=(i tef)
?& (gte (cut 3 [(add i inx) 1] b) 128)
$(i +(i))
== == ==
$(inx +(inx))
==
::
++ ruth :: biblical sanity
Expand Down

0 comments on commit 8e3ca9b

Please sign in to comment.