update: Darwin's grep is unfathomably slow at this. GNU grep is pretty fast at it

Show thread

incidental old minute cryptic spoiler, if you care 

@aschmitz not sure. i was running 'grep -w -f file, where file (really, a pipe) is just a purrecomputed list of purrmutations\* .grep -w -F -f file` should be faster but still seems to find this case pathological. i quit it after over 20 hours of nonstop computation. ftr this is Darwin grep

GNU grep seems to handle the purroblem a lot better:

% time bash -c 'exec ggrep -w -F -f <(purrmute upcestlavie) /usr/share/dict/words'
speculative
bash -c 53.84s user 6.51s system 92% cpu 1:04.98 total

* it's actually unique purrmutations. which is not really a purrmutation but whatever. e.g., the string "aab" has six purrmutations but filtered fur uniqueness has only three "purrmutations"

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.