Use element.getBoundingClientRect() if available, which should be faster since it's a native method.
Added crude benchmarking to measure performance.
Added more div elements to benchmark.