News for hackers. Stuff that matters.
Re:Things that make Go fast by pcwalton on Saturday June 07, 2014 @02:06PM (#7862620)
> C++ again suffers from cross-compilation unit visibility; even if your LTO can detect an inlineable call, its AFAIK not possible at that time to move heap allocations to the stack.

Sure it is. Why not?

C++ compilers don't usually do this because it doesn't help much—explicit memory management encourages people to not allocate unless necessary in the first place.

Re:Things that make Go fast by Nitramp on Sunday June 08, 2014 @03:10AM (#7864169)
> Sure it is. Why not?

Do you have a reference for that? I'd expect this to be hard, at linking time you no longer have the C++ source, so it's much harder to make such decisions.

Re:Things that make Go fast by pcwalton on Sunday June 08, 2014 @02:00PM (#7865336)
You don't need the C++ source, just the IR. LLVM already removes mallocs if they are unused:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-July/033017....