free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.77k stars 100 forks source link

1.1.2 #192

Closed abique closed 1 year ago

abique commented 1 year ago

I find the performance statement to be speculative. You need benchmark for this, and it all depends on how the host and the plugin are implementing the lookup.

We don't want a host with a slow lookup to do it instead of the plugin isn't it?

Also there can be situation where a bad host lookup will trigger many CPU cache miss while the plugin lookup may have a better cache coherence.

I believe the condition for this optimization to be always successful on the host side, is a lookup faster or equal to an array access, or the factorization of the lookup over multiple events in a single block, which maybe isn't so common yet.

To me this cookie is worth it only if the host implementation is fast, and I'm setting the threshold as high as necessary.

abique commented 1 year ago

After talking with @baconpaul , we've agreed on some changes to the cookie documentation.