Closed
Description
There is a ::std::mem::swap(&mut clist, &mut nlist);
call generated when using regex!
.
The two variables have the type Threads
which can get very large, in this particular case, I estimate they're each 22kB.
According to valgrind, each exec
call ends up with 200
memcpy's - this makes regex!
five times slower than the dynamic regex, for me.
Adding a single line recovers performance of the generated code, even if it's only marginally better than the dynamic regex:
let (mut clist, mut nlist) = (&mut clist, &mut nlist);
No other changes are necessary because of deref coercions (as weird as &mut &mut T -> &mut T
may be).
Metadata
Metadata
Assignees
Labels
No labels