Re: Replacing tango.text.Ascii.isearch

2022-10-07 Thread rassoc via Digitalmars-d-learn
On 10/8/22 00:50, Siarhei Siamashka via Digitalmars-d-learn wrote: On Friday, 7 October 2022 at 12:19:59 UTC, bachmeier wrote: python -c "print(('a' * 49 + 'b') * 2)" > test.lst That's generating a file with a single line: $> wc -l test.lst 1 test.lst Going with an appropriate 100k mixed

Re: Replacing tango.text.Ascii.isearch

2022-10-07 Thread Siarhei Siamashka via Digitalmars-d-learn
On Friday, 7 October 2022 at 12:19:59 UTC, bachmeier wrote: https://www.cs.utexas.edu/users/moore/best-ideas/string-searching/ "the longer the pattern is, the faster the algorithm goes" Yes, that's how substring search works in the standard libraries of the other programming languages. Now pl

Re: Replacing tango.text.Ascii.isearch

2022-10-07 Thread bachmeier via Digitalmars-d-learn
On Friday, 7 October 2022 at 07:16:19 UTC, Siarhei Siamashka wrote: On Friday, 7 October 2022 at 06:34:50 UTC, Siarhei Siamashka wrote: Also are we allowed to artificially construct needle and haystack to blow up this test rather than only benchmarking it on typical real data? Such as generat

Re: Replacing tango.text.Ascii.isearch

2022-10-07 Thread Siarhei Siamashka via Digitalmars-d-learn
On Friday, 7 October 2022 at 06:34:50 UTC, Siarhei Siamashka wrote: Also are we allowed to artificially construct needle and haystack to blow up this test rather than only benchmarking it on typical real data? Such as generating the input data via running: python -c "print(('a' * 49 + 'b'