String concatenation with optimistic types is slow

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • None
    • 9
    • b22
    • generic
    • generic
    • Verified

        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.

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

                Created:
                Updated:
                Resolved: