Based on the buffer doubling scheme in Yajl. This seems to make Jiffy's encoder times less spikey, but I'm still a bit slower. It appears to be related to floats or memory handling. Not sure how to track this down.