We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Yes I think that's why I believe a C/C++ solution iterating through the values once, performing summing, min'ing, and max'ing should be a lot faster. Although I wonder if python or any other language can intelligently identify that sum(a), max(a), min(a) are all performed on the same constant data and therefore compute them prior to their calls. I may be overestimating the power of such compilers/interpreters.
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
Yes I think that's why I believe a C/C++ solution iterating through the values once, performing summing, min'ing, and max'ing should be a lot faster. Although I wonder if python or any other language can intelligently identify that sum(a), max(a), min(a) are all performed on the same constant data and therefore compute them prior to their calls. I may be overestimating the power of such compilers/interpreters.