I was messing around with a reactive-based frameworks and found it very expressive. Unfortunately, most of them are using techniques that are not very efficient on CPU cashing mechanism such as calling indirect code, and traversing sometimes big collections of subscribers, some of which are readonly, but some can mutate them. That made me thinking of some optimizations that could be implemented : for example, you can imagine that when a core encounters an object that broadcast changes, which is implemented as calling indirect functions, the cpu may miss that data and spend hundreds of cycles loading necessary information. That makes some potential application domains to not be populated with reactive approaches. So my question is that if it would be possible to make it such that cores can be delegated execution of such code in parallel? Or am i mistaken and this kind of code could still be efficiently processed due to all speed-up tricks in modern cpus?
And if the former is true, how to make cpu cores signal they companions in multiprocessor cpu to load pieces of data so they handle them concurrently?