|
|
|
|
|
by vlovich123
357 days ago
|
|
That would be great if the engine or compiler had that kind of capability but building that requires solving the halting problem. Even if you try to do it with heuristics, go ask Itanium how that worked out for them and they tried a much simpler problem than what you’re proposing. |
|
But it seems to me like this would be a safe space to experiment. With heuristics and pragmas as a fallback. Because with the right approach solutions would mostly be better than not doing anything.
And you could do it in runtime when you know the size of the input.
And what about applying the logic to places where you can see that the loop will end?
I believe query planners in for example Trino/BigQuery do this already?