Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Compiler Source Code Optimization
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DemonWasp




PostPosted: Fri Nov 06, 2009 11:03 am   Post subject: Compiler Source Code Optimization

I found a link to these lecture slides on Reddit. They deal with some fairly advanced topics in assembly and compilers, but I think that most CS students in 2nd or 3rd year should be able to pick up on most of the content, particularly those who have taken the introduction-to-compilers course (CS241 at UWaterloo) and the introduction-to-CPU-hardware (CS251 at UWaterloo).

All the examples are written in C, but in general the code isn't bad to understand.

Lecture slides here.

Short version: In general, you aren't going to do better than the compiler with silly tricks unless you really, really, really know what you're doing. Unless you're prepared to learn about all the fiddly details, avoid obfuscation-for-optimisation and write clean code.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Nov 06, 2009 2:59 pm   Post subject: Re: Compiler Source Code Optimization

DemonWasp @ Fri Nov 06, 2009 11:03 am wrote:
you aren't going to do better than the compiler

And if you can, then that should probably go into the compiler itself. I can't wait to take CS444 (4th year compilers), it will be awesome.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: Fri Nov 06, 2009 3:19 pm   Post subject: RE:Compiler Source Code Optimization

A valid point. Reading this paper made me wish for the day I get to take that course...and it also made me want to work on gcc, because apparently it produces some ridiculously awesome code for lots of things.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: