Speed up promise serialization (about 8x faster)