<div dir="ltr"><div>Benchmarking is ultimately about finding what performs best, and this invariably involves a lot of manual benching, recording, and comparing of different individual expressions.  I've been wanting to optimize this process for a long time, and today I finally took the time to spank out a first draft of this new feature in Chronology-Core-cmm.52.</div><div><br></div><div>Here's an example inspired by my discovery about creating Dictionary's with a pre-allocated size:</div><div><br></div><div>   { [Dictionary new].</div>   [Dictionary new: 4]} benchCompare     <div><br></div><div>answers an Array with corresponding measurements, along with an <font color="#cc0000">extra field</font> at the beginning:<br><div><br></div><div>   {'[Dictionary new]'->'<font color="#cc0000">100% of baseline rate</font>, 26,300,000 per second. 38.1 nanoseconds per run. 7.85843 % GC time.' . </div>   '[Dictionary new: 4]'->'<font color="#cc0000">13% of baseline rate</font>, 3,510,000 per second. 285 nanoseconds per run. 1.18 % GC time.'}"</div><div><br></div><div>The first one is the baseline, and so will always report "100%".  The subsequent ones are relative to that baseline.</div><div><br></div><div>Since this is a new feature, it won't make it into 5.3, but I would like put this into trunk after the release.  Please let me know your thoughts.</div><div><br></div><div>Best,</div><div>  Chris</div></div>