diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java
index 31056fa27f43af32e3b7e0111b94b70f96e8f67e..ac47fa670537deda57b0a0adf5378f332d69c0d1 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java
@@ -124,6 +124,9 @@ public abstract class ClassHierarchyNode extends UnaryNode {
         RAttributes attributes;
         if (attrStorageProfile.profile(arg instanceof RAttributeStorage)) {
             // Note: the seemingly unnecessary cast is here to ensure the method can be inlined
+            // Note2: the attrStorageProfile and cast is better at helping compiler to inline
+            // 'getAttributes' than just the ValueProfile in else branch, which degrades when it
+            // sees two different classes
             attributes = ((RAttributeStorage) arg).getAttributes();
         } else {
             arg = argProfile.profile(arg);