Slides from Felix von Leitner's talk on C and compiler optimizations
linux-kongress.org
Slides from Felix von Leitner's talk on C and compiler optimizations
1–7 of 7 posts
Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#2Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#3Are video/audio recordings available too?
Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#4 long
fact(long x, long acc)
{
if (x
(edit: the whole slide deck is summarized well on the last slide: "If you do an optimization, test it on real world data. If it’s not drastically faster but makes the code less readable: undo it.")Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#5Hm, regarding the tail-optimization slides, the example used doesn't look like a tail-recursive call. I just tried compiling the function he provided using gcc's -O1, 2 and 3, and neither produced a tail optimized call. I rewrote it to match what my idea of a tail-recursive call is, and sure enough, under -O2 and -O3, gcc tail-optimized it. It didn't however with no optimization settings or -O1. I rewrote it as follo…
Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#6http://www.fefe.de/know-your-compiler.pdf http://dl.fefe.de/optimizer-isec.pdf
Regardless, it's a good read!
Re: Slides from Felix von Leitner's talk on C and compiler optimizations
#7Hm, regarding the tail-optimization slides, the example used doesn't look like a tail-recursive call. I just tried compiling the function he provided using gcc's -O1, 2 and 3, and neither produced a tail optimized call. I rewrote it to match what my idea of a tail-recursive call is, and sure enough, under -O2 and -O3, gcc tail-optimized it. It didn't however with no optimization settings or -O1. I rewrote it as follo…