MFC icon indicating copy to clipboard operation
MFC copied to clipboard

Use floating point division for benchmarking

Open sbryngelson opened this issue 1 year ago • 1 comments

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.

sbryngelson avatar Apr 09 '24 14:04 sbryngelson

Update: Fixing this issue would surely fix the "divide by zero" error

sbryngelson avatar Apr 17 '24 11:04 sbryngelson

Was closed by #423

sbryngelson avatar May 22 '24 17:05 sbryngelson