Skip to content

Optimization for name value pair attribute sets #7676

@infinisil

Description

@infinisil

Is your feature request related to a problem? Please describe.
Name-value pairs like { name = "..."; value = "..."; } are frequently used, especially when converting between attribute sets and lists using builtins.listToAttrs and lib.mapAttrsToList lib.nameValuePair. It would be beneficial for these operations to be optimized.

Describe the solution you'd like
It should be possible to implement an optimization for such values by storing the name and value directly in the Value union, just like how lists of sizes <= 2 are.

Ping @roberth

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions