Arc.length() can be very slow. This PR teaches Arc to cache the computed length, so subsequent calls are faster. It verifies the validity of the cache by hashing the arc parameters.
This speeds one particular workload up from 1m 10s to ~4s, and another, larger workload goes from 19m 23s to 6m 40s.
Arc.length() can be very slow. This PR teaches Arc to cache the computed length, so subsequent calls are faster. It verifies the validity of the cache by hashing the arc parameters.
This speeds one particular workload up from 1m 10s to ~4s, and another, larger workload goes from 19m 23s to 6m 40s.