Github user sksamuel commented on the pull request:
https://github.com/apache/spark/pull/5376#issuecomment-90662827
In general Hotspot is good at optimizing away unneeded allocations but in
this case, since you're invoking a method on the allocated object, you're
actually asking hotspot to realize that the method is a delegate and the
delegation call can be flattened (I hestitate to use the word inlined so we
don't go off topic on inlining of local functions which hotspot does). I don't
think Hotspot can do this currently, but would be impressed to learn otherwise.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]