Skip to content
  • Alan Wu's avatar
    11e7ab79
    Remove 1 allocation in Enumerable#each_with_index (#11868) · 11e7ab79
    Alan Wu authored
    * Remove 1 allocation in Enumerable#each_with_index
    
    Previously, each call to Enumerable#each_with_index allocates 2
    objects, one for the counting index, the other an imemo_ifunc passed
    to `self.each` as a block.
    
    Use `struct vm_ifunc::data` to hold the counting index directly to
    remove 1 allocation.
    
    * [DOC] Brief summary for usages of `struct vm_ifunc`
    11e7ab79
    Remove 1 allocation in Enumerable#each_with_index (#11868)
    Alan Wu authored
    * Remove 1 allocation in Enumerable#each_with_index
    
    Previously, each call to Enumerable#each_with_index allocates 2
    objects, one for the counting index, the other an imemo_ifunc passed
    to `self.each` as a block.
    
    Use `struct vm_ifunc::data` to hold the counting index directly to
    remove 1 allocation.
    
    * [DOC] Brief summary for usages of `struct vm_ifunc`
Loading