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

String concatenation with optimistic types is slow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • 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.

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

                Created:
                Updated:
                Resolved: