<div dir="ltr">Dear Brad,<div><br></div><div>Benchmark seems to show that doing any the following operations below with a and b as argument compared to doing the same with c and d as argument is about the following X slower:</div><div><br></div><div><font face="courier new, monospace">*: 179x (0.23345 vs 0.0013 ms per operation)</font></div><div><font face="courier new, monospace">/: 2.7x (0.23269 vs 0.0889 ms per operation)</font></div><div><font face="courier new, monospace">+: 202x (0.12112 vs 0.0006 ms per operation)</font></div><div><font face="courier new, monospace">-: 200x (0.12008 vs 0.0006 ms per operation)</font></div><div><br></div><div>I guess this is because in the further case, the respective operation involves the calculation of a lowest common denominator for the divisor (i.e. what makes (+ 1/3 (+ 3/4 5/6)) and (+ (+ 1/3 3/4) 5/6) get the same result)?</div><div><br></div><div><br></div><div>If so, I guess we can be clear that primarily for * + - , in batch calculations there'd be value in having the ability to perform those operations without that calculation, and then making a separate operation for that function - or are the algorithms such that postponing wouldn't actually be for the win?</div><div><br></div><div><br></div><div>At what location in Gambit's sources is this calculation performed?</div><div><br></div><div>Thanks,</div><div>Mikael</div><div><br></div><div><br></div><div>(define (r) (random-integer (expt 10 100)))</div><div><div><div><br></div><div>(define a (/  (r)  (r)))</div><div>(define b (/  (r)  (r)))</div></div></div><div><br></div><div><div>(define c (r))</div><div>(define d (r))</div></div><div><br></div></div>