> Regex has been around a long time > and lots of smart computer science types has > spent time coming up with ways to optimize its performance for pattern > matching.
That's was true, it's still true and will always be true! and here are some benchmarks done in a late rainy sunday evening: * Regex2 faster than Chunk by: 2.1 times* For the details: 1) Regex1 is the original regex, Chunk1 is from Richard, Regex2 is mine. 2) You can noticed the difference in time depending on the value of pPage ( that's a normal behavior with regex) 3) I've done the calculation the same way as Richard did, so you can compare ****** aPage = 1, Same? true true Regex1: 8943 ms Chunk1: 210 ms Regex2: 99 ms Regex2 faster than orig regex by: 90.3 times Regex2 faster than Chunk by: 2.1 times ****** aPage = 2, Same? true true Regex1: 9946 ms Chunk1: 212 ms Regex2: 100 ms Regex2 faster than orig regex by: 99.5 times Regex2 faster than Chunk by: 2.1 times ****** aPage = 3, Same? true true Regex1: 4451 ms Chunk1: 210 ms Regex2: 98 ms Regex2 faster than orig regex by: 45.4 times Regex2 faster than Chunk by: 2.1 times ****** aPage = 4, Same? true true Regex1: 11465 ms Chunk1: 200 ms Regex2: 98 ms Regex2 faster than orig regex by: 117 times Regex2 faster than Chunk by: 2 times ****** aPage = 5, Same? true true Regex1: 11457 ms Chunk1: 201 ms Regex2: 94 ms Regex2 faster than orig regex by: 121.9 times Regex2 faster than Chunk by: 2.1 times Kind regards, Thierry ------------------------------------------------ Thierry Douez - http://sunny-tdz.com sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode