You are viewing a single comment's thread. Return to all comments →
For point 1), that's a simple method call, inlined by the JVM if "hot":
public int length() { return value.length; }
For point 3), there is no computation for charAt method (except a check which is optimized by the JVM RangeCheckElemination & Co):
public char charAt(int index) { if ((index < 0) || (index >= value.length)) { throw new StringIndexOutOfBoundsException(index); } return value[index]; }
public char charAt(int index) { if ((index < 0) || (index >= value.length)) { throw new StringIndexOutOfBoundsException(index); } return value[index];
}
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
For point 1), that's a simple method call, inlined by the JVM if "hot":
For point 3), there is no computation for charAt method (except a check which is optimized by the JVM RangeCheckElemination & Co):