# HG changeset patch # User Christian Urban # Date 1544109331 0 # Node ID eecbc9ae73c23fcd1431dd03fba25e15f2b8355e # Parent bebe34c975a8e49e692ffeab78b3eb645ddb9a33 updated diff -r bebe34c975a8 -r eecbc9ae73c2 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 bebe34c975a8 -r eecbc9ae73c2 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 bebe34c975a8 -r eecbc9ae73c2 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))