--- a/progs/catastrophic.java Sat Jan 21 00:25:09 2017 +0000
+++ b/progs/catastrophic.java Wed Feb 08 11:01:50 2017 +0000
@@ -8,7 +8,7 @@
public class catastrophic {
public static void main(String[] args) {
- //we always run all the tests twice -> warmup of the JVM
+ //we always run all the tests twice -> to warmup of the JVM
for (int runs = 0; runs < 2; runs++) {
Pattern pattern = Pattern.compile("(a*)*b");
@@ -25,7 +25,8 @@
for (int i = 0; i < 2; i++) {
pattern.matcher(input).find();
}
-
+
+ // Print out time
System.out.println(length + " " + input + ": "
+ ((System.nanoTime() - start) / 2000000000d)
+ "s");