News for hackers. Stuff that matters.
Re:Show HN: Bolt – A super-fast, statically-typed scripting ... by beariish on Monday August 11, 2025 @08:16AM (#44863336)
I appreciate the followup here. The brainfuck interpreter isn't meant to be a benchmark notably, it's a naive implementation for the sake of the example.

I did spot some poor code in the Bolt version of nbody that can be changed (the usage of `.each()` in the hot loop is creating loads of temporary iterators, that's the memory difference.)

luajit -joff does perform better even with this change, but I observe closer to 15% than a 2x difference

Re:Show HN: Bolt – A super-fast, statically-typed scripting ... by megapoliss on Monday August 11, 2025 @10:32AM (#44864557)
for nbody 500000 on my i5-9300H CPU @ 2.40GHz

  - 487.41 millis / 2364 kb ram for luajit -joff
  - 770.17 millis / 41712 kb ram for bolt

  770.17 / 487.41 ~~ 1.58 cpu, not 2x, but not 15% either
  41712 / 2364 ~~ 17.64 ram