We are running some experiments with Cilk and one thing that strikes us as weird is that our code has some "warm up needed" effect. When we run the code for the first time, it times at, say 8secs, while further repetitions of the function call. If we run the code (even with different arguments), it goes down to say 0.5, and consistently stays there. It may be cache, it may be prefetching, etc., but I'd like to first rule out CilkPlus as the culprit. For that, I would like to know: during task creation and scheduling, does the Cilk runtime "realize" at any point that he can optimize some tasks for any reason? Is there any other under-the-hood optimizations that may be causing this behavior?
Thanks very much for your time.