/** This is a profiling test to test tight loops which call functions. */ count = million //input["hit enter."] // Allow jvisualvm to attach println["Conditional + return"] for i = 1 to 10 { start = now[] for a = 1 to count compare[a,500000] end = now[] println["Frequency is " + count/(end-start)] } println["\n\nEnd return with 2 functions"] for i = 1 to 10 { start = now[] for a = 1 to count uncompare[a,500000] end = now[] println["Frequency is " + count/(end-start)] } compare[a,b] := { if a < b return a else return b } uncompare[a,b] := { return min[a,b] }