Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8048586

String concatenation with optimistic types is slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        this test abridged from node's test/pummel/test-https-large-response.js -

        var body = '';
        print('build body...');
        for (var i = 0; i < 1024 * 1024; i++) {
          body += 'hello world\n';
        }
        print('done\n');

        with jdk8u20, this test case takes 1.5s, with jdk9 (1.9.0-internal-akhil_2014_06_27_09_52-b00), takes more than several minutes and has to be killed. I suspect exponential behavior in string concat.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                akhil Akhil Arora (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: