Skip to content

Major slowdown as einsum optimize path used even for two arguments #10357

Closed

Description

@mhvk

While looking at #10343 and #10352, I wondered why optimization is attempted for only 2 inputs, when there is obviously nothing to optimize. The slowdown is dramatic, a factor of 25 (enough to label this a regression):

a = np.eye(3)
b = np.arange(3)
%timeit np.einsum('...ij,j...->i...', a, b)
# 10000 loops, best of 3: 87.7 µs per loop
%timeit np.einsum('...ij,j...->i...', a, b, optimize=False)
# 100000 loops, best of 3: 3.52 µs per loop

Activity

  1. added this to the milestone on Feb 3, 2018
  2. added a commit that references this issue on Feb 15, 2018
    f031b7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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