[Ann] ABBench: Lightweight Microbenchmarking Library

I’ve just released a utility I’ve been using for the past few years to help optimize Pharo code. It’s a library that makes it easy to check whether an optimization has improved performance by wrapping the optimization and the old code in an if block and executing the optimized and unoptimized paths repeatedly under the same runtime conditions to determine which is faster. 

Basic usage is to wrap changes to the code in if blocks like so:
ABBench a: [ …existing code…] b: […optimized code…]
And then run the A/B test by printing:
ABBench bench: […some main method…]

I have found it to make performance testing simple and quick enough that I actually do it. Perhaps someone else will find it useful.
Install with:

Metacello new
  githubUser: 'emdonahue' project: 'ABBench' commitish: 'master' path: ''; 
  baseline: 'ABBench';

More details can be found here: 



%d bloggers like this: