Testing memory allocation speed