progs/re4.scala
changeset 425 d14a9bdac26f
parent 422 5deefcc8cffa
child 441 028816884f70
equal deleted inserted replaced
424:1129024b26d5 425:d14a9bdac26f
    82   for (j <- 1 to i) code
    82   for (j <- 1 to i) code
    83   val end = System.nanoTime()
    83   val end = System.nanoTime()
    84   (end - start)/(i * 1.0e9)
    84   (end - start)/(i * 1.0e9)
    85 }
    85 }
    86 
    86 
       
    87 // warmup
    87 val i = 5000
    88 val i = 5000
    88 println(i + " " + "%.5f".format(time_needed(10, matcher(EVIL1(i), "a" * i))))
    89 println(i + " " + "%.5f".format(time_needed(10, matcher(EVIL1(i), "a" * i))))
    89 
    90 
    90 for (i <- 1 to 7000001 by 1000000) {
    91 for (i <- 1 to 7000001 by 1000000) {
    91   println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i))))
    92   println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i))))