I’m a bit late to this thread, but I have a few historical and current items to add. A few years back, we noticed some performance issues with instanceof checks for interfaces in tight loops in the Scala collection library and worked around by switching to a virtual call. The original performance bug and analysis was reported by the Spark team in: Major performance bottleneck in scala.collection.mutable.Builder · Issue #9823 · scala/bug · GitHub We eventually linked this back to: https:/...