Perf: optmize dom.data()

Perf: dry up the benchmark code