If I get it correctly, I think it will not give the exact same result as sum(array), see this for example.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Slow code to compute b=A*x | 7 | 212 | July 3, 2024 | |
| Compiler Can't Optimize Away Unnecessary Memory Allocs with Convenience Variables | 14 | 739 | May 3, 2023 | |
| Compiler optimizations with broadcast or map | 5 | 2536 | June 27, 2020 | |
| Small functions - best practices | 5 | 869 | February 8, 2021 | |
| Reduce memory allocated in array view and in place sum | 12 | 813 | November 10, 2023 |