netty / netty-incubator-codec-quic

Apache License 2.0
303 stars 72 forks source link

Use Integer.valueOf(...) to reduce object creation #619

Closed normanmaurer closed 12 months ago

normanmaurer commented 12 months ago

Motivation:

Integer.valueOf(...) uses a cache internally to reduce object creation. Let's take advantage of that

Modifications:

Replace new Integer(...) calls with Integer.valueOf(...)

Result:

Less Object allocations