My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

This tool takes a list of keywords, and outputs a C/C++ function that determines if the passed in string is one of the words in the fixed list. The function generated should be (depending on the quality of your compiler) significantly faster on average than a solution based on a simple binary search.

Initial testing seems to show that, for C++ keywords, the generated code runs in 10%-20% of the time it takes to do a binary search using string compares. That is to say, the code is up to 10x faster.

The tool can generate functions for strings passed in with or without a length, char and wide-char strings, and for case sensitive or case insensitive languages, creating code the targets either POSIX or Win32 for case-insensitive string compares.

The whole program is a single C++ source file with no external dependancies.

Code generated by gen-is-keyword-fn is used to implement the Unreal Script support in the MetalScroll for Visual Studio.

Powered by Google Project Hosting