Skip to content

Implement "fieldset" optimization for record types #2474

Closed
@pcwalton

Description

@pcwalton

Currently, record field names are stored as strings in the structural types. This is inefficient; every time we want to define a record in the type table we must perform a string comparison against every field name. Instead we can simply intern an entire "fieldset" -- a list of interned field strings, compared by pointer value only -- as we come across it. Then ty_rec would be something like fieldset, [mt].

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemI-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions