gh-142145: Avoid timing measurements in quadratic behavior test (gh-143105)

Count the number of Element attribute accesses as a proxy for work done.
With double the amount of work, a ratio of 2.0 indicates linear scaling
and 4.0 quadratic scaling. Use 3.2 as an intermediate threshold.
1 file changed