arr should be a top-level binding so you can be fairly certain that it's computed at most once regardless of optimizations