gustafn
committed
on 02 Nov 21
Performance improvement: make "apm_version_names_compare" faster by a factor of ~100

The function "apm_version_names_compare" is called rel… Show more
Performance improvement: make "apm_version_names_compare" faster by a factor of ~100

The function "apm_version_names_compare" is called relatively often

and issues an SQL query. The function is stable (returns always the

same results for the same input) and called with only a few different

input values. By using acs::per_thread_cache the performance improves

from 265 microseconds to 2 microseconds; by using the per-tread cache

the operation scales better since it is fully lock-free (once cached).

Show less