Well I can tell you folks one thing, making many small changes in the way the algorithm is coded helps immensely !
But Hans, I do agree, for the most part, the language is inconsequential. I think I wanted to refresh my memory on C++, so I wouldn’t forget it altogether.
The major, and I do mean MAJOR improvement in CLUES v1/v2 to v3 was not so much the move from Perl to C++, but in other factors. Those factors were mainly:
(1) removal of all usages of regular expressions
(2) removal of all usages of strings (except of course for initial input from user and retrieval of parts of speech for each word, which is unavoidable, we don’t want user to enter a string of integers instead of English words !!)
(3) pre-compiled the grammar and semantic rules so they are turned into integers.
(4) http://en.wikipedia.org/wiki/Space-time_tradeoff - that is, there is hardly any looping in CLUES v3. The engine has direct pointers, bypassing need for searching (or GREATLY reducing it).
Overall the speed increase was about four to five hundred times.