Machine-translated by Google. Questions are authored in English.
Top

Discussion

The chief cost of an over-large hash table in a compiler is

  • A.wasted memory in buckets that hold no entries at all
  • B.an increase in the number of collisions that occur
  • C.a lookup cost that grows with the table size
  • D.the inability to add entries once compilation begins

Answer: A

Lookup stays fast and collisions become rarer, so the only real penalty is space. Compilers usually start small and grow the table as the program turns out to require it. A very small program should not pay for a table sized for a very large one.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.