[erlang-questions] [ANN] Silly benchmarking

Richard Carlsson carlsson.richard@REDACTED
Tue Apr 30 22:02:22 CEST 2013

On 2013-04-30 21:42, Motiejus Jakštys wrote:
> On Tue, Apr 30, 2013 at 8:17 PM, Richard Carlsson
> <carlsson.richard@REDACTED> wrote:
>> And here's my unfinished benchmarking project:
>>    https://github.com/richcarl/berk
> This looks quite big and unusual compared to others.
> Can you explain what you calibrate,

I started out wanting a really stable core measurement loop, and a way 
to calibrate the system under test so that it could automatically set 
good defaults for number of iterations, and be aware of the clock 
precision and typical variance. As I went on, I started abstracting more 
and more, and some ideas (like the "berps" - bogus erlang reductions per 
second) got left as rough sketches, and there's nothing yet that 
actually saves the result of a calibration and reuses it.

The parts that are working well are the runner/1, gather/1, and stats/1 
functions, and the functions run/2, run_for/2, and calibrate/0, which 
you can study to understand how the runner and gather functions work. 
There's still some tweaking to be done - the calibration doesn't always 
converge as well as I'd like it.

> and what is the purpose of sending
> a message many times to a dead process? Does it have some well-defined
> behavior in the virtual machine?

No, it was just a way to set up a calibration loop that did something 
very cheap but that the compiler couldn't optimize away. But that part 
isn't very exciting - I'm not using it for anything yet. I just dropped 
all of the code in a single module to keep it simple at this stage.


More information about the erlang-questions mailing list