Tagged articles

boxing

4 articles · Page 1 of 1
Golang Shines
Golang Shines
Mar 9, 2026 · Backend Development

How to Use Generics in Go to Eliminate sync.Pool Boxing Overhead

This article explains why the pre‑generic sync.Pool suffers from boxing and type‑assertion costs, shows how to wrap it with a type‑safe generic Pool[T] implementation, demonstrates usage with a byte‑buffer example, and outlines the three main benefits and caveats of the approach.

GoPerformanceboxing
0 likes · 5 min read
How to Use Generics in Go to Eliminate sync.Pool Boxing Overhead
Java Backend Technology
Java Backend Technology
Jun 25, 2022 · Fundamentals

Why Java Wrapper Classes Can Kill Performance and Trigger NPEs

This article explains how Java wrapper classes, introduced with generics, provide boxing and unboxing sugar but can cause subtle bugs such as incorrect == comparisons, severe performance penalties, unexpected NullPointerExceptions, and confusing API usage, and it offers practical best‑practice guidelines.

JavaNullPointerExceptionUnboxing
0 likes · 9 min read
Why Java Wrapper Classes Can Kill Performance and Trigger NPEs