in reply to Re: Multi-thread combining the results together
in thread Multi-thread combining the results together
Instead of running for each @tokens, I suspect that it would be faster to run the regex against a single string of the concatenation of all of the tokens.testing: "k5bai" 0: ^.5BAI$ 1: ^K.BAI$ 2: ^K5.AI$ 3: ^K5B.I$ 4: ^K5BA.$ 5: .*5BAI\z 6: ^K5ABI\z <-N2 error 7: ^K5BIA\z <-N2 error 8: ^K5IBA\z <- really bad 9: ^K5AIB\z 10: ^KB5AI\z 11: ^K5BA\z 12: ^K5BI\z 13: ^K5AI\z 14: ^K5B\z my regex = (^.5BAI$)|(^K.BAI$)|(^K5.AI$)|(^K5B.I$)|(^K5BA.$)|(.*5BAI\z +)|(^K5ABI\z)|(^K5BIA\z)|(^K5IBA\z)|(^K5AIB\z)|(^KB5AI\z)|(^K5BA\z)|(^ +K5BI\z)|(^K5AI\z)|(^K5B\z)
I haven't thought about this code for many moons. Time for a re-think.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multi-thread combining the results together
by 1nickt (Canon) on Jul 25, 2019 at 11:12 UTC | |
|
Re^3: Multi-thread combining the results together
by vr (Curate) on Jul 25, 2019 at 12:29 UTC | |
by AnomalousMonk (Archbishop) on Jul 25, 2019 at 14:50 UTC | |
by Marshall (Canon) on Jul 27, 2019 at 02:53 UTC | |
by vr (Curate) on Jul 27, 2019 at 17:30 UTC |