# A greedy algorithm slashes memory use in molecular simulation

Original title: Automated optimization of a molecular simulation program

> Hacker News story 49804052 · language: en · submitted 2026-09-22
> Web version: https://zeli.app/story/49804052
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 19 · by [shishir03](<https://news.ycombinator.com/user?id=shishir03>) · 💬 3
[original](<https://shishir-iyer.medium.com/automated-optimization-of-a-molecular-simulation-program-4a28a2bc05ad>) · [HN discussion](<https://news.ycombinator.com/item?id=49804052>)

## Summary

In this personal account, Shishir Iyer describes how he and the Paesani Research Group at UC San Diego optimized MBX, a molecular simulation package. They vectorized a three-body water polynomial with SIMD instructions, but the speedup was limited by memory demands. By introducing the concept of 'livesize' and applying redundant subexpression removal and statement reordering, they reduced the maximum livesize by over 20% in the first pass, bringing the program's memory usage closer to the theoretical minimum.

## Key quote

> The redundant subexpression removal was able to significantly reduce the livesize, with over a 20% reduction in maximum livesize from the first pass alone.

---

## Cite

- Page: https://zeli.app/story/49804052
- Date: 2026-09-22
- Source: shishir-iyer.medium.com (https://shishir-iyer.medium.com/automated-optimization-of-a-molecular-simulation-program-4a28a2bc05ad)
- Hacker News: https://news.ycombinator.com/item?id=49804052

## Other languages

- zh: https://zeli.app/zh/story/49804052 · markdown: https://zeli.app/zh/story/49804052.md
- ja: https://zeli.app/ja/story/49804052 · markdown: https://zeli.app/ja/story/49804052.md
- ko: https://zeli.app/ko/story/49804052 · markdown: https://zeli.app/ko/story/49804052.md
- de: https://zeli.app/de/story/49804052 · markdown: https://zeli.app/de/story/49804052.md
- es: https://zeli.app/es/story/49804052 · markdown: https://zeli.app/es/story/49804052.md
- ru: https://zeli.app/ru/story/49804052 · markdown: https://zeli.app/ru/story/49804052.md
