120,001 introspections, 3 distinct: making Typst's convergence check 334 faster Typst, a Rust-based typesetting system, optimized its convergence check by 334× by deduplicating introspections. A developer found that 11.6 million introspections were being re-executed 6 times each due to a push-only recording step with no deduplication, despite the introspection types already implementing PartialEq and Hash. By filtering duplicates, the cost dropped from 70 million re-executions to just 3 distinct introspections. This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry. Written with AI assistance Claude . The measurements, negative controls and verification below are real and reproducible — every number was taken from the runs described. Typst https://github.com/typst/typst is a markup-based typesetting system written in Rust — think LaTeX, but with a sane language and compile times measured in milliseconds. You write = Heading , it produces a PDF. The interesting part for this challenge is how Typst handles introspection . Documents can ask questions about their own finished layout: "what page is this heading on?", "how many figures are there?", "give me every