Skip to content

Using List.iter causes a function allocation #8184

Closed
@TIHan

Description

@TIHan

Using List.iter is idiomatic when iterating through a list, but it causes a function allocation. Because of this, in certain instances, we have to resort to using for..in..do for iteration on a list to prevent a function allocation; we did that in this PR: #8175

Ideally, we should not have to change such idiomatic code to prevent allocations. This issue is to track that.

Here is the WIP PR to resolve this issue: #8176

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions