# Optimizing a C collision detection 100x with an LLM

> Source: <https://twitter.com/mike_acton/status/2066778535902298405>
> Published: 2026-06-16 19:58:26+00:00

Using an LLM to optimize code: I created a reference implementation of

[@kevintracy48](https://x.com/kevintracy48)'s collision detection in C, then used gpt-5.5 to optimize it and managed a > 100x speedup from that baseline. Cost ~125M tokens Code and details:I’m excited to finally show off fast and robust differentiable collision detection between pairs of convex primitives!
paper:

[arxiv.org/abs/2207.00669](https://arxiv.org/abs/2207.00669)code:[github.com/kevin-tracy/Di…](https://github.com/kevin-tracy/DifferentiableCollisions.jl)00:00
