search for: f_val

Displaying 3 results from an estimated 3 matches for "f_val".

Did you mean: _val
2015 May 04
5
[LLVMdev] Memory Allocation Optimized away with new by not with ::operator new
...implementation, I realised that the allocation were not optimized away because I was using ::operator new. When I’ve switched back to new, the optimisation came back. Is it expected or a bug from LLVM? François ===== #include <iostream> #include <vector> std::vector<double> f_val(std::size_t i, std::size_t n) { auto v = std::vector<double>(n); for (std::size_t k = 0; k < v.size(); ++k) { v[k] = static_cast<double>(i); } return v; } int main (int argc, char const *argv[]) { const auto n = std::size_t{10}; const auto nb_loops =...
2015 May 04
2
[LLVMdev] Memory Allocation Optimized away with new by not with ::operator new
...from LLVM? François Fayard Founder & Consultant - Inside Loop Tel: +33 (0)6 01 44 06 93 <tel:+33%206%2001%2044%2006%2093> Web: www.insideloop.io <http://www.insideloop.io/> Twitter: @insideloop_io ===== #include <iostream> #include <vector> std::vector<double> f_val(std::size_t i, std::size_t n) { auto v = std::vector<double>(n); for (std::size_t k = 0; k < v.size(); ++k) { v[k] = static_cast<double>(i); } return v; } int main (int argc, char const *argv[]) { const auto n = std::size_t{10}; const auto nb_loops =...
2015 May 01
6
[LLVMdev] Deduplication of memory allocation
Hi, Even though this question does not only concern LLVM, it seems that only compilers guru can answer it. So I am giving a try here, hoping for the best. In a recent talk by Chandler Carruth, “Performance with algorithms, efficiency with data structures” ( https://www.youtube.com/watch?v=fHNmRkzxHWs <https://www.youtube.com/watch?v=fHNmRkzxHWs> ), Chandler says that one should never