3 ms·
No it's not. Might as well say that SQL is a brute force search against your database. If you don't add indexes, you end up with slow queries. The art of ef
by segmondy 8y ago
No it's not. Might as well say that SQL is a brute force search against your database. If you don't add indexes, you end up with slow queries.
The art of efficient in prolog is understanding your database, facts, and your search space and how to trim it. If you need 3 items, search for 3 items only, don't search for all possible items then try to pick 3.
If you can figure out when to cut your search, do so.
For deterministic operations that you can meomize, do so.
If your system supports tabling use it.
Difference list is like the TCO of Prolog, the efficiency can be amazing.
The difference in performance between an average programmer and a pro prolog programmer is usually much more than you will find in other languages.