progs/while-arrays/compile_bfc.sc
changeset 817 89f9c68fc417
parent 815 f56d18757526
child 825 dca072e2bb7d
equal deleted inserted replaced
816:2b6e23985982 817:89f9c68fc417
    18 //  amm compile_bfc.sc all
    18 //  amm compile_bfc.sc all
    19 //  amm compile_bfc.sc bfcX
    19 //  amm compile_bfc.sc bfcX
    20 
    20 
    21 
    21 
    22 // load the compiler
    22 // load the compiler
    23 import $file.compile_arrays
    23 import $file.compile_arrays2
    24 import compile_arrays._ 
    24 import compile_arrays2._ 
    25 
    25 
    26 def time_needed[T](i: Int, code: => T) = {
    26 def time_needed[T](i: Int, code: => T) = {
    27   val start = System.nanoTime()
    27   val start = System.nanoTime()
    28   for (j <- 2 to i) code
    28   for (j <- 2 to i) code
    29   val result = code
    29   val result = code