Skip to content

Optimize function calls #6

Description

@l2zou

Currently, Rickroll bytecode stores the function cache as a HashMap<String, Function>. However, hashing a string is sometimes expensive (especially in a while loop).

The proposed change is to hash the string during lexing and store the result in a bijective HashMap (i.e. BiHashMap<u64, String>). Then, we can simply store a u64 in Statement::Verse which hashes in constant time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions