I suspect it's because OOK SVs aren't Copy-On-Write-able.
I did a quick profile, and with test2() the code spends most of it's time in memcpy() called from reg_set_capture_string().
In reply to Re: Are beheaded strings known to be slow?
by tonyc
in thread Are beheaded strings known to be slow?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |