text: Details
  Description
  From version 1.6.x onwards, groovy compiler caches the number constants to optimize the runtime performance. Currently it is done only for top-level classes and not for classes that get generated for closures.
  So, If I say
  def cl = { 1000.times{ def i = 10 println i } } cl()
  Constants 10 and 1000 are not cached and Integer object for value 10 gets created 1000 times. Optimization done for top-level classes is needed even for inner classes that get generated for closures.
  Activity
  - All
  - Work Log
  - History
  - Activity
  - Transitions
  since the optimization way for 1.8 is now to use the primitives directly, there is no use for this idea anymore