Skip to content

Optimize IArray instantiations #6833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolasstucki opened this issue Jul 10, 2019 · 0 comments
Closed

Optimize IArray instantiations #6833

nicolasstucki opened this issue Jul 10, 2019 · 0 comments

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Jul 10, 2019

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

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 15, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 15, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 15, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 16, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 16, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 22, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 22, 2019
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 30, 2019
nicolasstucki added a commit that referenced this issue Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant