token: Improve speed of TokenWriter