It's possible to optimize and speed up TextEncoder.encode() by a size of 7x by following the implementation from https://github.com/cloudflare/workerd/pull/5448. cc @nodejs/performance