View Single Post
Old 03 May 2021, 17:55   #41
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
It should be criminally simple to create a benchmark (running, say, 1,000,000x) that compares execution time of various inputs to the DIV and create another variant that uses divu.w.

Shouldn't take more than 10 minutes to write.

All you really need is just an actual HW to run it.


A 20 MHz CPU should execute about 250,000 divisions in a second (at ~80 cycles).
Feeding the two registers and looping should bring that to about ~175,000 (very rough estimate, don't have the cycle table at hand, so feel free to look it up and adjust accordingly).

So, running a benchmark for 10,000,000x should provide sufficient benchmarking precision [from comparison standpoint].



In fact, what I don't understand, is that how come, if you are concerned about the performance, and you have an access to the HW, you actually haven't written such benchmark in the first place before even creating the thread ?

Last edited by VladR; 03 May 2021 at 17:57. Reason: typos
VladR is offline  
 
Page generated in 0.04840 seconds with 11 queries