improve packet writer benchmark