Instead of looping over the entire table and setting every entry to 0, memset the entire table at once.