Details
-
Improvement
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
None
-
None
Description
DataObjectStreamer.commonStreamList() can end up performing a lot of instanceof checks to check if the writer can perform caching. For large lists this is wasteful – we should be able to just check half of the condition just once.
Note that the logic here is very shallow, so JIT may actually be optimizing this case very well by hoisting it. Add a benchmark to see if our investment in complicating the code by hoisting the check manually actually makes sense.