Transaction speedup: use arrays instead of hashmaps for internal
bookkeeping.