Also, if you want to dive deeper, the book, "Prolog and Natural Language Analysis" by Fernando C. N. Pereira and Stuart M. Shieber, is available as a free PDF from the publisher:
And there's a set of course materials in HTML for "Natural Language Processing in Prolog", a course at Union College in Schenectady, NY by Patrick Blackburn and Kristina Striegnitz that seems worthwhile:
Reasoning about performance is quite possible; there's good advice in Richard O'Keefe's The Craft of Prolog.
[Edit: fixed the book title, thanks to a friendly correction. The Practice of Prolog is a different book, also good, but less relevant.]