Tag about-compilers

26 bookmarks have this tag.

Stuff about how compilers work. Interpreters, runtimes and other stuff like that also goes here.

2024-08-21

146.

typedKanren: Statically Typed Relational Programming with Exhaustive Matching in Haskell

arxiv.org/pdf/2408.03170

a fun implementation of *Kanren with nice Haskell interoperability. showcases some fun Haskell featues.

2024-08-17

144.

Techniques for Safe Garbage Collection in Rust

kyju.org/blog/rust-safe-garbage-collection

a really cool post explaining design of gc-arena

2024-05-28

138.

uops.info

uops.info/table.html

Latency, throughput and port usage of x86 instructions.

2024-05-19

111.

Compilers for free with weval

bernsteinbear.com/blog/weval

With some partial evaluation and specialization hints, it is possible to get pretty decent speedups on interpreters by turning them into compilers.

2024-01-17

103.

A universal lowering strategy for control effects in Rust

www.abubalay.com/blog/2024/01/14/rust-effect-lowering

The Rust language has incrementally grown a set of patterns to support control-flow effects including error handling, iteration, and asynchronous I/O. In The registers of Rust, boats lays out four aspects of this pattern shared by Rust’s three effects. Today these effects are typically used in isolation, or at most combined in bespoke ways, but the Rust project has been working on ways to integrate them more deeply with each other, such as async gen blocks.

The theory of algebraic effects and handlers has explored this design space and offers answers to many of the questions that the Rust project has encountered during this work. This post will relate the patterns employed by Rust to the terminology and semantics of effects, to help build a shared vocabulary and understanding of the implications of combining multiple effects.

2023-12-23

98.

Speculation in JavaScriptCore

www.webkit.org/blog/10308/speculation-in-javascriptcore

This post is all about speculative compilation, or just speculation for short, in the context of the JavaScriptCore virtual machine.

2023-12-15

95.

Performance of WebAssembly (WASM) runtimes in 2023

00f.net/2023/01/04/webassembly-benchmark-2023

Comparison between different runtimes and with native code.

94.

The Generic Dilemma

research.swtch.com/generic

The generic dilemma is this: do you want slow programmers, slow compilers and bloated binaries, or slow execution times?

No generics / monomorphization / dynamic dispatch

2023-11-30

85.

Semantic fuzzing of the Rust compiler and interpreter

ethz.ch/content/dam/ethz/special-interest/infk/inst-pls/plf-dam/documents/StudentProjects/MasterTheses/2023-Andy-Thesis.pdf

A very nice paper about fuzzing Rust compiler by generating custom MIR. Found some bugs in both rustc and LLVM, but notably not in Cranelift.

2023-11-26

65.

Bootstrapping with FORTH

compilercrim.es/bootstrap

What if all software suddenly disappeared? What's the minimum you'd need to bootstrap a practical system? I decided to start with a one sector (512-byte) seed and find out how far I can get.

64.

The myrmics memory allocator

citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1074.2437&rep=rep1&type=pdf

A paper about message-passing memory allocator: could be useful for actor systems.

63.

Toy Tutorial - MLIR

mlir.llvm.org/docs/Tutorials/Toy

MLIR is an interesting LLVM compiler framework thingy that uses LLVM for multiple representations instead of just high-level assembly.

This tutorial runs through the implementation of a basic toy language on top of MLIR. The goal of this tutorial is to introduce the concepts of MLIR; in particular, how dialects can help easily support language specific constructs and transformations while still offering an easy path to lower to LLVM or other codegen infrastructure. This tutorial is based on the model of the LLVM Kaleidoscope Tutorial.

54.

No Sane Compiler Would Optimize Atomics

www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4455.html

The paper’s claim:

False.

Compilers do optimize atomics, memory accesses around atomics, and utilize architecture-specific knowledge. This paper illustrates a few such optimizations, and discusses their implications.

Interestingly, none of the optimizations proposed in the paper actually work on GCC or Clang.

2023-11-25

44.

Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches

bibliography.selflanguage.org/_static/pics.pdf

Abstract: Polymorphic inline caches (PICs) provide a new way to reduce the overhead of polymorphic message sends by extending inline caches to include more than one cached lookup result per call site. For a set of typical object-oriented SELF programs, PICs achieve a median speedup of 11%.

43.

Laurence Tratt: Why Aren't Programming Language Specifications Comprehensive?

tratt.net/laurie/blog/2023/why_arent_programming_language_specifications_comprehensive.html
42.

Laurence Tratt: How Hard is it to Adapt a Memory Allocator to CHERI?

tratt.net/laurie/blog/2023/how_hard_is_it_to_adapt_a_memory_allocator_to_cheri.html
41.

Chapel: Productive Parallel Programming

chapel-lang.org
40.

Cranelift's Instruction Selector DSL, ISLE: Term-Rewriting Made Practical

cfallin.org/blog/2023/01/20/cranelift-isle
39.

A New Backend for Cranelift

cfallin.org/blog/2020/09/18/cranelift-isel-1
37.

Codebase as Database: Turning the IDE Inside Out with Datalog

petevilter.me/post/datalog-typechecking

Introspectable and extensible IDEs with logic programming

36.

RefinedC: Automating the Foundational Verification of C Code with Refined Ownership Types

plv.mpi-sws.org/refinedc/paper.pdf
34.

Pointers Are Complicated, or: What's in a Byte?

www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html

Explanation of provenance, uninitialized memory and stuff like that. Useful as an entry point into realization that we don’t live in PDP-11 world anymore.

14.

Introducing Riptide: WebKit’s Retreating Wavefront Concurrent Garbage Collector

webkit.org/blog/7122/introducing-riptide-webkits-retreating-wavefront-concurrent-garbage-collector

The new Riptide garbage collector in WebKit leads to a five-fold improvement in latency in the JetStream/splay-latency test.

12.

Search-based compiler code generation

jamey.thesharps.us/2017/06/19/search-based-compiler-code-generation
11.

Introducing the B3 JIT Compiler

webkit.org/blog/5852/introducing-the-b3-jit-compiler

WebKit's FTL JIT now uses a new backend on OS X — the Bare Bones Backend, or B3 for short, replaces LLVM as the low-level optimizer.

10.

Introducing the WebKit FTL JIT

webkit.org/blog/3362/introducing-the-webkit-ftl-jit

Designed to bring aggressive C-like optimizations to the largest variety of JavaScript programs.