Skip to content

Combine cache-lookup and fast-path in a single branching pattern for V8 inlining #74

@alanzabihi

Description

@alanzabihi

Per #67's win: V8 inlining of parse() into callers matters. Can we go further? Try combining cache-lookup into the return path so parse() body is just 'return cache.get(s) || parseSlow(s)'. This keeps the wrapper at 1-2 AST nodes. Risk: || does wrong thing for NaN. Use conditional ? :. Must maintain fingerprints. Target: 0.5-1.5ms additional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions