Know a great AI tool or AI news source? Submit it to AiByts

compilers

24 stories

Stories

  • How to prove equations using diagrams, part 3

    The concept of initial functor provides a categorical and operational semantics for equational reasoning with diagrams. So far, we have explored this thesis in the simplest possible setting, that of a bare category, or, in logical terms, of an equational theory with unary function symbols.

    Lobsters16 min read
  • How to prove equations using diagrams, part 1

    An e-graph, short for “equality graph,” is a data structure that maintains a congruence relation on expression trees: an equivalence relation stable under forming new expressions.

    Lobsters14 min read
  • Pratt parsing is a black box

    It caught my attention that most of Pratt parsing tutorials that I've stumbled on spend almost all of their time explaining Pratt's algorithm and none explaining the properties behind Pratt that actually matter.

    Lobsters35 min read
  • Beating the compiler at signed 32-bit division

    Dividing integers is slow on our processors. A 32-bit division costs: processor latency throughput Emerald Rapids about 12 cycles one every 6 cycles Zen 4 9 to 12 cycles one every 6 cycles Zen 5 10 to 13 cycles one every 6 cycles Arrow Lake performance core 12 cycles one every 6 cycles Apple M4 ……

    Lobsters9 min read
  • A brief history of just-in-time (2003)

    PDF Software systems have been using "just-in-time" compilation (JIT) techniques since the 1960s. Broadly, JIT compilation includes any translation performed dynamically, after a program has started execution.

    Lobsters1 min read
  • Switch lowering in GCC

    We have seen in a previous post that switch statements are more complex than they seem. The compiler is able to implement them as a decision tree (even though maybe it shouldn't). Is that everything it can do?

    Lobsters19 min read
  • The glorious @xkcdRandom Zig builtin

    One of my favorite xkcd comics of all time is Random Number. The image depicts a C function that supposedly returns a random integer, but in reality always returns 4.

    Lobsters3 min read
  • Objects, attributes, maps, oh my

    In many dynamically typed programming languages, objects look like a big ol’ mapping of names to values. The languages encourage this flexibility. Consider for example Python:

    Lobsters14 min read
  • Efficient Extraction for Effectful E-graphs

    Statewalk DP makes effect-aware e-graph extraction fast without ILP: the problem is NP-complete in general but tractable in statewalk width, and in eggcc, an e-graph compiler for imperative Bril programs, extraction is no longer the bottleneck.

    Lobsters2 min read
  • Compiler bootstrapping depends on more than you might think

    You're probably reading this page because you've attempted to access some part of my blog (Wandering Thoughts) or CSpace, the wiki thing it's part of. Unfortunately you're using a browser version that my anti-crawler precautions consider suspicious, most often because it's too old (most often this…

    Lobsters3 min read
  • Chasing a -O2 pessimization in antcc

    Recently I was benchmarking the generated code efficiency for my C compiler antcc, and I noticed something concerning in a simple Lua benchmark:

    Lobsters13 min read
  • Branches in branch-free code

    You can see the output on Compiler Explorer, alongside versions compiled with GCC and with the Zicond extension we’ll look at below.

    Lobsters6 min read
  • rat's minimal register allocator

    rat is my smallish compiler backend (with a semi-working C99 frontend). Its x86-64 code generator translates the intermediate representation (IR) into x86-64 instructions. These use an unlimited number of virtual registers (vregs).

    Lobsters11 min read
  • Refinement E-Graphs

    The idea of a refinement e-graph is to add a baked in a <= relation that is about as privileged as the e-graph’s native =

    Lobsters29 min read

Showing 18 of 24 stories

Load more stories
AiByts Weekly Brief

Get the top AI news and tools straight to your inbox every week.

Weekly · AI news

Join 15,000+ AI enthusiasts