progs/re4.scala
changeset 638 0367aa7c764b
parent 631 f618dd4de24a
equal deleted inserted replaced
637:27f71d2755f0 638:0367aa7c764b
    93   (end - start) / (i * 1.0e9)
    93   (end - start) / (i * 1.0e9)
    94 }
    94 }
    95 
    95 
    96 
    96 
    97 // test: (a?{n}) (a{n})
    97 // test: (a?{n}) (a{n})
    98 for (i <- 0 to 7000000 by 500000) {
    98 for (i <- 0 to 11000 by 1000) {
    99   println(f"$i: ${time_needed(2, matcher(EVIL1(i), "a" * i))}%.5f")
    99   println(f"$i: ${time_needed(2, matcher(EVIL1(i), "a" * i))}%.5f")
   100 }
   100 }
   101 
   101 
   102 
   102 
   103 // test: (a*)* b
   103 // test: (a*)* b