Skip to content
Discussion options

You must be logged in to vote

If I remember correctly:

  • g_opcode_n - the number of entries we have in g_opcodes_table starting with this ASCII characher
  • g_opcode_p - the index in g_opcodes_table where the entries with this starting character start

A quick optimization I did back around 20+ years ago, we use the first character in the source code and jump using that to the entries in g_opcodes_table that start with that character. But if we have 100 entries that start with character A (like AND...) we'll go through them all and stop as soon as we find a match in the mostly sorted structure...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lhsazevedo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants