Skip to content

Prior art & credits

Viscosity is by Tariq Shams. It stands on other people’s ideas. Each entry below was checked against a primary source; the full list (278 works) is the book’s bibliography.

Automatic Array Transformation to Columnar Storage at Run Time

Section titled “Automatic Array Transformation to Columnar Storage at Run Time”

Lukas Makor, Sebastian Kloibhofer, David Leopoldseder, Daniele Bonetta, Lukas Stadler, Hanspeter Mössenböck (2022). Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes (MPLR ’22), ACM, pp. 16–28. doi.org/10.1145/3546918.3546919

What it shaped: The core idea behind Viscosity: transform arrays of JavaScript objects into columnar (struct-of-arrays) storage automatically, and amortize the cost of the transformation.

Control Flow Duplication for Columnar Arrays in a Dynamic Compiler

Section titled “Control Flow Duplication for Columnar Arrays in a Dynamic Compiler”

Sebastian Kloibhofer, Lukas Makor, David Leopoldseder, Daniele Bonetta, Lukas Stadler, Hanspeter Mössenböck (2023). The Art, Science, and Engineering of Programming, vol. 7, issue 3, article 9. doi.org/10.22152/programming-journal.org/2023/7/9

What it shaped: Specialized code paths for transformed arrays, and handling nested (multi-level) objects; the reason Viscosity plans for duplicated, layout-specialized loops.

Struct of Arrays (SoA) in TypeScript with metaprogramming

Section titled “Struct of Arrays (SoA) in TypeScript with metaprogramming”

Bui Huy Giap (“Zap”, ziap) (2025). Zap’s website (blog post, 17 September 2025). ziap.github.io/blog/parallel-array/

What it shaped: Showed SoA in TypeScript winning on field-subset reads and losing when whole objects must be rebuilt; the reason Viscosity chooses a layout instead of always using SoA.

ispc: A SPMD Compiler for High-Performance CPU Programming

Section titled “ispc: A SPMD Compiler for High-Performance CPU Programming”

Matt Pharr, William R. Mark (2012). Proceedings of Innovative Parallel Computing (InPar), San Jose, CA. llvm.org/pubs/2012-05-13-InPar-ispc.html

What it shaped: ISPC’s soa types: the AoSoA (blocked) layout that Viscosity can choose.

Intel ISPC User’s Guide: Structure of Array Types

Section titled “Intel ISPC User’s Guide: Structure of Array Types”

The Intel ISPC project. ispc.github.io documentation. ispc.github.io/ispc.html

What it shaped: How a language can keep ordinary indexing syntax while storing data as blocked SoA.

Thomas Würthinger, Christian Wimmer, Andreas Wöß, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, Mario Wolczko (2013). Onward! 2013 (SPLASH 2013), ACM, pp. 187–204. doi.org/10.1145/2509578.2509581

What it shaped: Truffle and Graal, the runtime in which the columnar-array research was built.

Simple and Efficient Construction of Static Single Assignment Form

Section titled “Simple and Efficient Construction of Static Single Assignment Form”

Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon, Andreas Zwinkau (2013). Compiler Construction (CC 2013), LNCS 7791, Springer, pp. 102–122. doi.org/10.1007/978-3-642-37051-9_6

What it shaped: The SSA construction algorithm used by Viscosity’s IR (VIR).

Keith D. Cooper, Linda Torczon (2022). Morgan Kaufmann (Elsevier). shop.elsevier.com/books/engineering-a-compiler/cooper/978-0-12-815412-0

What it shaped: The compiler middle-end part: control-flow graphs, dataflow analysis, optimization passes.

The LLVM Project. LLVM documentation. llvm.org/docs/NewPassManager.html

What it shaped: Viscosity’s pass manager: cached analyses that are invalidated when a transform changes the program.

JavaScript engine fundamentals: Shapes and Inline Caches

Section titled “JavaScript engine fundamentals: Shapes and Inline Caches”

Mathias Bynens, Benedikt Meurer (2018). mathiasbynens.be. mathiasbynens.be/notes/shapes-ics

What it shaped: The explanation of shapes (hidden classes) and inline caches in the engine-internals part.

Robert Nystrom (2021). Free web edition at craftinginterpreters.com (© 2015–2021); source, text and test suite at github.com/munificent/craftinginterpreters. github.com/munificent/craftinginterpreters

What it shaped: The whole shape of this book: build a language twice (a tree-walking interpreter, then a bytecode VM), and in Track B rebuild everything in a second, lower-level language. The Drip test suite is adapted from its MIT-licensed Lox tests. Its prose and illustrations (CC BY-NC-ND 4.0) are not copied or adapted here.

ESTree contributors. github.com/estree/estree. github.com/estree/estree/blob/master/es5.md

What it shaped: Chapter 14: real JavaScript ASTs are a discriminated union; every ESTree node has a string type field that says which kind of node it is.

acorn and oxc (JavaScript parsing), sucrase (TypeScript stripping), and in the book, Astro, React, CodeMirror, ts-fsrs and Pagefind, all MIT-licensed. See THIRD_PARTY_NOTICES.md in the repository.