What is the primary purpose of a term index in computer science?

A. To facilitate fast lookup of terms and clauses in a logic program
B. To optimize the performance of a web search engine
C. To manage memory allocation in a database
D. To improve the security of online transactions
Answer: 