Make encoder a tiny bit faster and doc performance
6 files changed