MFC
MFC copied to clipboard
Use floating point division for benchmarking
Right now benchmarking recording input and outupt time in full seconds, resulting in weird numbers when the numbers are close or the same.
We can fix this by modifying the files something like
https://github.com/MFlowCode/MFC/blob/master/toolchain/templates/include/helpers.mako
replace date +%s with date +%s%n, which gives the time in nanoseconds (integer) (note this doesn't work on MacOS, but that's fine).
We also want to switch the elapsed output time to be in seconds not nanoseconds so:
https://github.com/MFlowCode/MFC/blob/e3c4a067e410c308e6c53c0eaa722bde0c8f44ba/toolchain/templates/include/helpers.mako#L89
should be
$(echo "($t_${target.name}_stop - $t_${target.name}_start)/1000000000" | bc -l)
I haven't tested this yet.
Update: Fixing this issue would surely fix the "divide by zero" error
Was closed by #423