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

Consolidate and streamline String concat code shapes

XMLWordPrintable

    • b08

      Some optimizations to the default StringConcatFactory might have made the code generation a bit more complex than necessary, and we can see that for more complex concat expressions we drop off in performance a bit too soon.

      I've made a few consolidations and see improvements on multiple microbenchmarks with little to no change on bootstrapping overheads.

      - Generate prependers that always append "" prefixes then remove the no-prefix prepend methods and simplify the code to do less branches and fewer operations on longs
      - Same for the newArray combinator: always add a "" suffix
      - Various other simplifications and optimizations

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: