progs/re4.scala
changeset 638 e951b9688bb2
parent 631 60608e227478
equal deleted inserted replaced
637:936560fab865 638:e951b9688bb2
    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