Rusty Russell on Nostr: I had way too much fun optimizating CLN due to a Boltz report recently. Like most ...
I had way too much fun optimizating CLN due to a Boltz report recently. Like most engineers, I love optimizing, but bitter experience means I only allow myself to do so when I have an actual problem to solve.
My favourites:
1. Adding 1M entries to a sqlite3 table with two indexes: 81 seconds. Adding entries *then* creating indices: 17 seconds.
2. Optimization of O(n²) cleanup code by realizing it could be deleted entirely.
I admit I continued to optimize long after their performance problem was fixed, but you gotta have *some* fun!
Published at
2025-10-24 21:55:58 UTCEvent JSON
{
"id": "733d6e749689f734eb9aa496a49409ca2951960408cf1adafaa46c71138f5754",
"pubkey": "f1725586a402c06aec818d1478a45aaa0dc16c7a9c4869d97c350336d16f8e43",
"created_at": 1761342958,
"kind": 1,
"tags": [
[
"alt",
"A short note: I had way too much fun optimizating CLN due to a B..."
]
],
"content": "I had way too much fun optimizating CLN due to a Boltz report recently. Like most engineers, I love optimizing, but bitter experience means I only allow myself to do so when I have an actual problem to solve.\n\nMy favourites:\n1. Adding 1M entries to a sqlite3 table with two indexes: 81 seconds. Adding entries *then* creating indices: 17 seconds.\n2. Optimization of O(n²) cleanup code by realizing it could be deleted entirely.\n\nI admit I continued to optimize long after their performance problem was fixed, but you gotta have *some* fun! ",
"sig": "24d6eb65c68036374feabf5f29beb3532470dd6e96499a5b3d4dac24efa85d288d2b0138083d6157ad6ac4c02ee0c50d45bdbb52780cd039e29056f34572b344"
}