You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/07/25 13:32:55 UTC

[GitHub] [groovy] paulk-asert edited a comment on pull request #1324: GROOVY-9637: Improve the performance of GString

paulk-asert edited a comment on pull request #1324:
URL: https://github.com/apache/groovy/pull/1324#issuecomment-663855778


   Daniel's simple benchmark:
   ```
   def gstr = makeGString()
   long b = System.currentTimeMillis()
   for (int i = 0; i < 10000000; i++) {
   	gstr.toString()
   }
   long e = System.currentTimeMillis()
   println "${e - b}ms"
   
   //@groovy.transform.CompileStatic
   def makeGString() {
       def now = java.time.LocalDateTime.now()
       "integer: ${1}, double: ${1.2d}, string: ${'x'}, class: ${Map.class}, boolean: ${true}, now: ${now}"
   }
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org