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

C2 should optimize some stringbuilder patterns

    Details

    • Subcomponent:
    • Resolved In Build:
      b12
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_9, windows_xp
    • Verification:
      Not verified

      Backports

        Description

        There are many common patterns of string concatenation using StringBuilder that could be transformed into much more efficient patterns. StringBuilder has some assumptions that it might be used in a persistent way that result in many extra copies and intermediate values being produced. Transforming these patterns into an optimal set of string operations can greatly speed up these operations.

        Doing this within in the context of hotspot has some extra complexity because of deoptimization. It always has to be possible to recover a valid execution state where you can resume in the interpeter. This we can handled by introducing a transactional style of code generation where an early JVMState capture the starting point and any uncommon traps lead back to that execution point. Any code like allocations also reuses that point to describe the current state.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  never Tom Rodriguez
                  Reporter:
                  never Tom Rodriguez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: