Skip to content

Optimize IArray instantiations #6833

Closed
Closed
@nicolasstucki

Description

@nicolasstucki

We want the same optimization done in #6821 for IArray.apply.

The idea is to use inlining to trigger the other optimization. The code should be rewritten to

object IArray {
  def apply[T](xs: =>T*) given (ct: =>ClassTag[T]): IArray[T] = Array(xs: _*)
  def apply(x: =>Boolean, =>xs: Boolean*): IArray[Boolean] = Array(x, xs: _*)
  def apply(x: =>Byte, =>xs: Byte*): IArray[Byte] = Array(x, xs: _*)
  def apply(x: =>Short, xs: =>Short*): IArray[Short] = Array(x, xs: _*)
  ...
}

This is currently blocked by #6854, #6750 and #6828

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions