Use `_.createCallback` if `_.matches` is unavailable for the perf test.
Avoid internally passing around metadata arrays.
Use WeakMaps if available to store function metadata.