You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using unique graphemes containing 2 or more code points seems to result in memory complexity that is quadratic to the number of graphemes. Example with 50,000 unique graphemes:
$ raku -e 'for 0..50000 { my @a = $_, 0x300; print @a.chrs; };'>test.txt
$ ls -lh test.txt
-rw-r--r-- 1 max max 242K Jan 17 22:34 test.txt
$ raku -e 'slurp;'<test.txt
Killed
$ raku -v
Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2021.09.
Implementing the 𝐑𝐚𝐤𝐮™ programming language v6.d.
Built on MoarVM version 2021.09.
# dmesg | grep 'Out of memory' | tail -1
[106097.011005] Out of memory: Killed process 16841 (raku) total-vm:15931556kB, anon-rss:15799148kB, file-rss:4kB, shmem-rss:0kB, UID:1000 pgtables:31092kB oom_score_adj:0
Memory consumption seems to be approximately 8.5*(graphemes/1000)^2 MiB, so 44k graphemes will exhaust the memory on my 16 GiB system.
The text was updated successfully, but these errors were encountered:
Using unique graphemes containing 2 or more code points seems to result in memory complexity that is quadratic to the number of graphemes. Example with 50,000 unique graphemes:
Memory consumption seems to be approximately
8.5*(graphemes/1000)^2 MiB
, so 44k graphemes will exhaust the memory on my 16 GiB system.The text was updated successfully, but these errors were encountered: