Skip to content

Optimize the TokenKind enum #336

Closed

Description

@Razican

As maciejh mentioned on Reddit, the TokenKind enumeration is too big for what it contains. This will be partly solved by string interning (#279), but it can be further optimized by replacing the regex flags by a more optimized structure.

The comment:

Your TokenKind enum is 7 words wide (56 bytes on 64bit arch), you can easily drop this by 3 words if you turn Regex flags into an inline buffer (you can probably manage with [u8; 7], one byte for length, 6 for content). Edit: shave another word by turning Strings into Box<str>s.

Activity

  1. added
    A-Performance
    Good First Issue
    on Apr 18, 2020
  2. self-assigned this
    on May 7, 2020
  3. linked a pull request that will close this issueExecution and Node modularization #392on May 17, 2020
  4. added this to the v0.9.0 milestone on May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-PerformanceGood First Issue

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions