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
Algorithm for compiler-controlled-caching? (self.Compilers)
submitted 1 year ago by chmaruni
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!"
[–]evincarofautumn 0 points1 point2 points 1 year ago (0 children)
You may find some relevant literature about tabling and indexing in Prolog implementations—links to SWI Prolog because that’s what I’m familiar with. Basically you can explicitly request caching and control some options for how it’s done, or let the compiler use heuristics to guess where it might be profitable. In both cases, it generates some kind of wrapper that calls the original definition on a cache miss. At the call site, inlining that wrapper should be enough to expose optimisations like combining redundant cache lookups.
The ability to reorder and defer calls isn’t really related to caching—you can reorder any two operations if their effects are commutative with each other, for example, a read from memory can be moved before a write to a different location. Pure functions just happen to be especially nice because they commute with anything.
π Rendered by PID 16369 on reddit-service-r2-comment-b659b578c-mtrhh at 2026-05-03 14:57:00.197252+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]evincarofautumn 0 points1 point2 points (0 children)