Add support for different allocation patterns
Improve test timing

Tests are now done over a fixed time, instead of a fixed number of times.