The new Go JSON API: twice as fast, or 1.5x slower?
SMRTR summary
Go 1.27 introduces a new JSON package (encoding/json/v2) that significantly boosts performance. Benchmarks show unmarshalling is 1.5x–2.3x faster and marshalling up to 3x faster compared to the original. Even without switching APIs, upgrading to Go 1.27 alone speeds up marshalling. The catch: typed struct marshalling is ~1.5x slower with the new API.
SMRTR provides this summary for quick context. The original article belongs to lobste.rs.
Read the original article