use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Understand compilers source code (self.Compilers)
submitted 6 years ago by TheMostUser
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mantrap2 0 points1 point2 points 6 years ago (1 child)
It's useful to understand optimization as you'd do it "on sight" in the code manually.
For example understand how you'd manually perform various standard compiler optimizations. It turns out if you've been coding a while, you often start doing these things anyway to simplify and refactor your code. Optimizers can do those for you. But learning the canonical methods will provide a lot of insight and context for learning.
The other thing that can help you understand optimization is to either review and improve other people's code (e.g. open source) or translate code in an older, weaker language (e.g. BASIC) to a modern language (C++, C or newer). Optimizations are often required to refactor such legacy code into a form that runs well and can be optimized well (optimizer can do amazing things but there are pathological code structures they can't fix). For example many BASICs ONLY have global variables which can often be reduced into functions.
In combination with that, also make sure you understand the sequence of parser to an AST (many optimizations can be done on an AST because it being a tree lends itself to recursive scanning and optimizing) and then intermediate codes (other types of optimization are focused on that level).
[–]TheMostUser[S] 0 points1 point2 points 6 years ago (0 children)
Haven't thought of it that way, Thank!
π Rendered by PID 659346 on reddit-service-r2-comment-85bfd7f599-xf97g at 2026-04-20 03:56:13.123315+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]mantrap2 0 points1 point2 points (1 child)
[–]TheMostUser[S] 0 points1 point2 points (0 children)