Skip to content
Snippets Groups Projects
Commit 3767a13f authored by Nick Paladino's avatar Nick Paladino
Browse files

Fixed math in calculations

parent e1a91a0b
No related branches found
No related tags found
No related merge requests found
array_assignments.ion 0.000378434s array_assignments.ion 0.000331540
array_methods.ion 0.000271493s array_methods.ion 0.000286822
arrays.ion 0.000650006s arrays.ion 0.000155707
arrays_with_braces.ion 0.000245790s arrays_with_braces.ion 0.000146670
basic_condition.ion 0.000240018s basic_condition.ion 0.000155057
braces.ion 0.000238225s braces.ion 0.000152580
break.ion 0.000253894s break.ion 0.000158761
builtin_piping.ion 0.000238527s builtin_piping.ion 0.000186408
color_test.ion 0.000240145s color_test.ion 0.000188989
command-substitutions.ion 0.000244207s command-substitutions.ion 0.000173809
comments.ion 0.000237473s comments.ion 0.000147198
conditionals.ion 0.000238094s conditionals.ion 0.000160260
continue.ion 0.000239293s continue.ion 0.000143139
else_if.ion 0.000238410s else_if.ion 0.000172871
exists.ion 0.000238906s exists.ion 0.000159765
fail.ion 0.000248338s fail.ion 0.000162390
fibonacci.ion 0.000249638s fibonacci.ion 0.000157263
fn.ion 0.000245006s fn.ion 0.000159370
for.ion 0.000245794s for.ion 0.000162347
function_piping.ion 0.000248026s function_piping.ion 0.000167740
glob.ion 0.000244100s glob.ion 0.000184011
herestring.ion 0.000244468s herestring.ion 0.000190068
inner_expansions.ion 0.000250048s inner_expansions.ion 0.000213646
let.ion 0.000243655s let.ion 0.000193824
match.ion 0.000244741s match.ion 0.000141248
methods.ion 0.000276658s methods.ion 0.000151908
multiline-arrays.ion 0.000246785s multiline-arrays.ion 0.000151316
multiple-lines.ion 0.000245504s multiple-lines.ion 0.000168683
nested_conditions.ion 0.000242605s nested_conditions.ion 0.000163736
nested_for.ion 0.000226091s nested_for.ion 0.000199267
not.ion 0.000242381s not.ion 0.000187366
pipelines.ion 0.000241742s pipelines.ion 0.000155655
scopes.ion 0.000241499s scopes.ion 0.000185241
script_exec.ion 0.000233643s script_exec.ion 0.000195759
strings.ion 0.000225746s strings.ion 0.000240247
while.ion 0.000237478s while.ion 0.000191514
# /usr/bin/env ion # /usr/bin/env ion
# Function for timing each individual script # function for timing each individual script
fn check_timing script fn check_timing script
let utime = 0.0 let utime:float = 0.0
# set var utime to time of executing script # loop 10 times
for n in 0..10 for _ in 0..10
let utime = @(time $script >/dev/null)[1] # set to actual number part of time output, has "s" as end
let utime_arrval = @(time $script >/dev/null)[1]
# make it a string var
let utime_str:str = $utime_arrval
# remove s at end and add to total
let utime:float += $utime_str[..11]
end end
#let utime /= 10 let utime /= 10
echo $script $utime echo $script $utime[..11]
end end
#cargo build --release #cargo build --release
for file in ./*.ion for file in ./*.ion
#if test $file == "run_benches.ion"
# continue
#end
check_timing $file >> temp.out check_timing $file >> temp.out
end end
cat temp.out | column -t > bench_results.txt
cat temp.out | column -t cat bench_results.txt
cp temp.out bench_results.txt
rm temp.out rm temp.out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment