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.
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.