However, I suspected my use of DimensionalMap was unnecessary – particularly since I was working with only one dimension at the time. So in a quick experiment, I replaced the code that used it with code using WeakMap. Total execution time with the same tests: about 1.5 seconds.
Ouch. I still think the API is a good one, but clearly the implementation has issues.