Method: GraphQL::Language::Lexer#_hash

Defined in:
lib/graphql/language/lexer.rb

#_hash(key) ⇒ Object

This produces a unique integer for bytes 2 and 3 of each keyword string See https://tenderlovemaking.com/2023/09/02/fast-tokenizers-with-stringscanner.html



254
255
256
# File 'lib/graphql/language/lexer.rb', line 254

def _hash key
  (key * 18592990) >> 27 & 0x1f
end