Optimization in the Source Engine is a critical component of mapping that not only makes your map compile faster but run better in game. However the two results are not always related.
"Why does it take so long for my map to compile?" The short answer is Source uses an optimization method called Binary Space Partitioning. The way this works is by cutting your map up into sections called leaves based on your brushes and then calculating what is in each leaf and then what leaves each leaf can see.
If you want a really good easy to follow explanation watch this video and this video
For optimizing in Source follow these in order and by the end you should have a fairly good understanding of how to optimize your map for performance and compile time. This is something you are going to have to practice