# HG changeset patch # User Christian Urban # Date 1544109331 0 # Node ID 26b5a843c6963361b0f4b8d9408777c3b856fc78 # Parent a0fd05d1e117d448db34d852650710e8eb737f6f updated diff -r a0fd05d1e117 -r 26b5a843c696 solutions5/benchmark.bf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/solutions5/benchmark.bf Thu Dec 06 15:15:31 2018 +0000 @@ -0,0 +1,4 @@ +>++[<+++++++++++++>-]<[[>+>+<<-]>[<+>-]++++++++ +[>++++++++<-]>.[-]<<>++++++++++[>++++++++++[>++ +++++++++[>++++++++++[>++++++++++[>++++++++++[>+ ++++++++++[-]<-]<-]<-]<-]<-]<-]<-]++++++++++. \ No newline at end of file diff -r a0fd05d1e117 -r 26b5a843c696 solutions5/bf.scala --- a/solutions5/bf.scala Thu Dec 06 13:52:50 2018 +0000 +++ b/solutions5/bf.scala Thu Dec 06 15:15:31 2018 +0000 @@ -216,7 +216,7 @@ val start = System.nanoTime() for (i <- 0 until n) code val end = System.nanoTime() - (end - start)/1.0e9 + (end - start)/(n * 1.0e9) } time_needed(1, run(b1)) diff -r a0fd05d1e117 -r 26b5a843c696 templates5/bf.scala --- a/templates5/bf.scala Thu Dec 06 13:52:50 2018 +0000 +++ b/templates5/bf.scala Thu Dec 06 15:15:31 2018 +0000 @@ -8,9 +8,9 @@ // (1) Write a function that takes a file name as argument and -// and requests the corresponding file from disk. It returns the +// and requests the corresponding file from disk. It Returns the // content of the file as a String. If the file does not exists, -// the function should return the empty string. +// the function should Return the empty string. import io.Source import scala.util._ @@ -186,7 +186,7 @@ val start = System.nanoTime() for (i <- 0 until n) code val end = System.nanoTime() - (end - start)/1.0e9 + (end - start)/(n * 1.0e9) } time_needed(1, run(b1))