Skip to content

Data.Vector.Generic.length not fusible #306

Description

@gksato

Unfortunately, the function Data.Vector.Generic.length is not currently covered by stream fusion. This is because length is defined in terms of Data.Vector.Generic.stream', which does not admit fusion rules at all.

As a result, the following simple code:
https://gist.github.com/gksato/417030a1f19f1f376dcb2fabaf66c10a#file-test-hs
does require a big allocation:
https://gist.github.com/gksato/417030a1f19f1f376dcb2fabaf66c10a#file-testbefore-ddump-simpl

I'm soon gonna submit a pull request to fix this!

Activity

  1. added a commit that references this issue on Jun 3, 2020
  2. added this to the 0.13 milestone on Jun 11, 2020
  3. added a commit that references this issue on Jun 20, 2020
  4. added a commit that references this issue on Jun 21, 2020
  5. added a commit that references this issue on Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions