1 2 Previous Next 27 Replies Latest reply: Sep 19, 2007 11:07 AM by 796440 Go to original post RSS
      • 15. Re: Regex Issue
        800282
        Your test also shows same time for two completely different expressions.
        ?
        See reply #11 and reply #14.
        • 16. Re: Regex Issue
          800282
          Your test also shows same time for two completely different expressions.
          Could you perhaps post the code that shows the exact same times with two different regexes? I bet you changed something.
          • 17. Re: Regex Issue
            807605
            I hope you are able to understand "same time" in not equal to "same number of ms each run". Sure my example was just bit lucky and showed exactly same time. There is difference but this difference is small see your own reply.
            So according your measurement method three expressions are just the same for calculation. This is reason to doubt measurements' results.

            BTW original question was about memory not time... Just for note :)
            • 18. Re: Regex Issue
              807605
              prometheuzz wrote:
              Your test also shows same time for two completely different expressions.
              Could you perhaps post the code that shows the exact same times with two different regexes? I bet you changed something.
              You own reply shows just the same times. Difference no longer then using original expressions.
              • 19. Re: Regex Issue
                800282
                You own reply shows just the same times. Difference no longer then using original expressions.
                No, the same time is the same number of milliseconds. Period.
                • 20. Re: Regex Issue
                  800282
                  Okay, to get back to your first post.

                  As brief as incorrect :)
                  What was wrong with my example? I made my point in that it doesn't make a lot of difference whether you write [0-9] or \d. What is wrong with that statement?

                  Let me guess -- ANY expression requires same time.
                  No, Kaj already posted an example that contradicts this.

                  Someone agree? Why? :)
                  I don't.
                  • 21. Re: Regex Issue
                    791266
                    Michael.Nazarov@sun.com wrote:
                    "A*1" really takes long time but two expressions provided by me works in same time.
                    So what?

                    You said that ANY expressions took the same time. I posted an expression that took longer time to execute. The fact that you were able to post two expressions that executed in the same amount of time doesn't prove anything.
                    • 22. Re: Regex Issue
                      807605
                      What was wrong with my example? I made my point in that it doesn't make a lot of difference whether you write [0-9] or \d. What is wrong with that statement?



                      Let me guess -- ANY expression requires same time.No, Kaj already posted an example that contradicts this.
                      Someone agree? Why? :)I don't.I was joke about ANY. As for your example I already wrote: same time for completely different expressions
                      is a cause to think about correctness of method.
                      • 23. Re: Regex Issue
                        807605
                        kajbj wrote:
                        Michael.Nazarov@sun.com wrote:
                        "A*1" really takes long time but two expressions provided by me works in same time.So what?
                        You said that ANY expressions took the same time. I posted an expression that took longer time to execute. The fact that you were able to post two expressions that executed in the same amount of time doesn't prove anything.Yes it doesn't prove anything. Please say to prometheuzz about this simple fact :)
                        • 24. Re: Regex Issue
                          796440
                          Michael.Nazarov@sun.com wrote:
                          What was wrong with my example? I made my point in that it doesn't make a lot of difference whether you write [0-9] or \d. What is wrong with that statement?



                          Let me guess -- ANY expression requires same time.No, Kaj already posted an example that contradicts this.
                          Someone agree? Why? :)I don't.I was joke about ANY. As for your example I already wrote: same time for completely different expressions
                          is a cause to think about correctness of method.
                          You said +"Let me guess -- ANY expression requires same time."+ That statement has been shown to be false, and there is nothing in it about correctness.
                          • 25. Re: Regex Issue
                            807605
                            Hate new engine... Hope you'll read my answers.
                            • 26. Re: Regex Issue
                              796440
                              Michael.Nazarov@sun.com wrote:
                              Hate new engine... Hope you'll read my answers.
                              We read them, understood them, and showed where they were flawed.
                              • 27. Re: Regex Issue
                                800282
                                Yes it doesn't prove anything. Please say to prometheuzz about this simple fact :)
                                My little test proves that it doesn't really matter if you use *[0-9]* or *\d* in a regex. You posted that you disagreed with that and even said that every regex would produce the same time, which I disagreed with.

                                So, I ask my question to you again:
                                What was wrong with my example? I made my point in that it doesn't make a lot of difference whether you write [0-9] or \d. What is wrong with that statement?
                                1 2 Previous Next