<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq" -->

---
title: Idiomatic Lisp and the nbody benchmark | daily.dev
description: A Common Lisp programmer explores what &#x27;idiomatic Lisp&#x27; means in the context of the nbody benchmark, prompted by a Twitter debate about Lisp&#x27;s performance vs...
canonical: https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Idiomatic Lisp and the nbody benchmark | daily.dev
og:description: A Common Lisp programmer explores what &#x27;idiomatic Lisp&#x27; means in the context of the nbody benchmark, prompted by a Twitter debate about Lisp&#x27;s performance vs...
og:url: https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq
og:image: https://api.daily.dev/og/posts/JHdEaN9HQ.png
og:image:alt: Idiomatic Lisp and the nbody benchmark
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Idiomatic Lisp and the nbody benchmark

**[Lobsters](https://daily.dev/sources/lobsters)** · 12 min read · 0 upvotes · 0 comments

## Summary

A Common Lisp programmer explores what 'idiomatic Lisp' means in the context of the nbody benchmark, prompted by a Twitter debate about Lisp's performance vs C. Starting from a conventional loopy Lisp port (~20% slower than C), the author builds a reusable kernel DSL in ~700 lines of library code that introduces `define-kernel-shape`, `define-pairwise-kernel`, `define-self-kernel`, and `define-reduction-kernel` macros — mirroring constructs in the Koru language. The DSL includes optional x64 SIMD auto-vectorization via macro-level expression rewriting. The result: the idiomatic DSL-based Lisp solution (1651ms) matches gcc -O3 -ffast-math C (1657ms) almost exactly, while the conventional loopy Lisp runs at 2005ms. The author argues this demonstrates that idiomatic Lisp — defined by leveraging metaprogramming to adapt the language to the problem — can match C performance without heroic effort.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.stylewarning.com/posts/nbody/>

## Similar posts on daily.dev

- [A road to Lisp: Why Lisp](https://daily.dev/posts/a-road-to-lisp-why-lisp-8ozisgpji) · Hacker News · 0 upvotes · 0 comments
- [A Road to Lisp: Which Lisp](https://daily.dev/posts/a-road-to-lisp-which-lisp-5slqf0fdz) · Hacker News · 1 upvotes · 0 comments
- [JeffBezanson/femtolisp: a lightweight, robust, scheme-like lisp implementation](https://daily.dev/posts/jeffbezanson-femtolisp-a-lightweight-robust-scheme-like-lisp-implementation-05mm9mqj8) · Hacker News · 0 upvotes · 0 comments
- [Ruby and Lisp — What Ruby Borrowed from Lisp’s Spirit](https://daily.dev/posts/ruby-and-lisp-what-ruby-borrowed-from-lisp-s-spirit-jxnfnpyms) · Ruby Flow · 0 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Idiomatic Lisp and the nbody benchmark","url":"https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq"},"datePublished":"2026-04-03T19:13:21.560Z","dateModified":"2026-04-03T19:13:46.311Z","description":"A Common Lisp programmer explores what 'idiomatic Lisp' means in the context of the nbody benchmark, prompted by a Twitter debate about Lisp's performance vs...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/idiomatic-lisp-and-the-nbody-benchmark-jhdean9hq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Idiomatic Lisp and the nbody benchmark"}]}
```

