Skip to content

Repeat received some optimization

Compare
Choose a tag to compare
@chewxy chewxy released this 10 Apr 02:55
· 90 commits to master since this release
d08c5f3

Breaking Changes:

  1. The Repeater interface has now been changed. Specifically, a Repeater now also has a method RepeatReuse.

What Changed:

  1. Repeat and Repeat reuse has some optimizations done on it.
  2. Some performance improvements.

Internally, a new type array2 has been created. array2 is a type that can never be allocated on the heap. The purpose of array2 is to facilitate operations with a lot of transient arrays (i.e. slicing operations). Because each array causes runtime.newobject to be called, array2 was created. By guaranteeing that array2 will only ever live on the stack, the gc pauses triggered by runtime.mallocgc is lessened, thus giving greater performance.