var PacketStream = require('../')
var N = 100000

N = +process.argv[2] || N

var replies = []

var start = Date.now()
var heap = process.memoryUsage().heapUsed
for(var i = 0; i < N; i++)
  replies.push({value: Math.random(), cb: function () {}})

console.log((Date.now()-start)/N, (process.memoryUsage().heapUsed - heap)/N)

for(var i = 0; i < replies.length; i++)
  replies[i].cb(null, replies[i].value)
replies = null

console.log((Date.now()-start)/N, (process.memoryUsage().heapUsed - heap)/N)







