2010YOUY01 commented on PR #18488: URL: https://github.com/apache/datafusion/pull/18488#issuecomment-3500711227
> Yup, its easier to autovectorize simple loops! But in Rust IIUC even iterators are lowered to loops itself. Interesting point to explore what didn't work out in this case. > > I have merged your PR, thanks for it! Yes, that’s true. I’m also curious about when auto-vectorization actually works and what’s an easy way to verify it. Once we start adding complexity to a simple loop body (e.g., iterators, branches, or inlined function calls), it tends to stop working at some point. I guess the situation is somewhat analogous to the optimization implementation inside `datafusion`: for example, `SELECT * FROM parquet_table WHERE a > 0` is likely to benefit from Parquet statistics pruning, whereas `SELECT * FROM parquet_table WHERE pow(a, 2) < 4` probably won’t. In theory, it’s entirely possible to support such cases, but in practice, we usually don’t have enough engineering bandwidth to implement it yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
