If you have a StringBuilder sb and a String str, then the following method runs very quickly:
sb.append(str)
because this method is an intrinsic. However, if you want to append only a subrange of the source string,
sb.append(str, start, end)
is much slower, because it does some range checking and then runs a Java loop from AbstractStringBuilder to do the copying.
It might be a useful optimization to optimize this code path, possibly by providing an intrinsic for StringBuilder.append(String, start, end).
sb.append(str)
because this method is an intrinsic. However, if you want to append only a subrange of the source string,
sb.append(str, start, end)
is much slower, because it does some range checking and then runs a Java loop from AbstractStringBuilder to do the copying.
It might be a useful optimization to optimize this code path, possibly by providing an intrinsic for StringBuilder.append(String, start, end).
There are no Sub-Tasks for this issue.