To test the new implementation I produced a DTrace script using multiple tick-1sec probes with a predicate based on the random() subroutine:
tick-1s
/random()%2 == 0/
{
@time["sample"] = quantize(2);
}
tick-1s
/random()%4 == 0/
{
@time["sample"] = quantize(4);
}
and so on.
The resulting distribution was then compared against the same distribution using the rand() subroutine. Biases in the rand() subroutine where on longer noticeable in the new implementation. See attachments:
{F783502}
{F783501}