alamb commented on PR #1561: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1561#issuecomment-2536393678
> On a whim, I also poked at optimizing the Token::make_word method that does a binary search over all keywords. That appears to have saved about 400ms (of 1.2s total originally attributed to it). I skimmed the docs for [phf](https://crates.io/crates/phf) but I'm not certain what this project's appetite is for new dependencies. It currently seems quite lean so I didn't pursue that just yet. I agree we try to keep the dependency set down to a minimum. \ I wonder if we could automatically generate a jumptable with some trickery (maybe we could make a custom match block keyed on individual letters)L Something like ```rust match word[0] { 'a' | 'A' => match word[1] { 'b'| 'B' = > //match the third letter here ``` We could then make a script, etc to generate this jumptable from the list of keywords 🤔 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
