felipecrv commented on PR #41021:
URL: https://github.com/apache/arrow/pull/41021#issuecomment-2039987936

   > I wonder would llvm / gcc have a pass or other things finding out that 
could it find the assertions? Seems that the rule in this case is trivial, 
maybe we can use this when it's not so trivial and have some benchmark shows 
that performance would benifits from this?
   
   Yes, they already do a great job finding assumptions [1] and the C++ 
standard allows many assumptions to be made. e.g. every pointer dereference 
assumes that the pointer is not-null, divisors are assumed to be non-0, signed 
arithmetic is assumed to not overflow, etc.
   
   [1] assertions and assumptions are very different things -> 
https://blog.regehr.org/archives/1096


-- 
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]

Reply via email to