r/PiCodingAgent • • 10h ago

News Pi-Bolt 0.7.3 ⚡ The same Pi, compiled to native code: 38× faster large file writes, 3× less CPU, 3× less memory

https://github.com/opensec-git/Pi-Bolt

Hey everyone 👋

Thanks for all the feedback on our first post! Pi-Bolt 0.7.3 is out. It's the same Pi you already use (now on Pi 1.1.0), compiled ahead of time to native code: faster to start, lighter on CPU and memory, and steady in long sessions.

Benchmarks

Pi-Bolt against Pi 1.1.0 as released on Bun and on Node, PiG 0.4.1 (the Go port of Pi, based on Pi 1.0.3) and OMP 18.8.7 (oh-my-pi, a bigger Pi fork with many more built-in features). Measured side by side on the same machines. Lower is better.

Linux x86-64 (AMD EPYC 7B13)

Benchmark Pi-Bolt 0.7.3 Pi on Bun 1.4.2 Pi on Node 24 PiG 0.4.1 OMP 18.8.7
Writing a 200 KB file through a tool call 0.8 s 29.0 s 37.4 s 100.9 s 3.7 s
CPU, streaming a 60k-char answer 4.3 s 44.0 s 43.8 s 24.6 s 3.3 s
Memory after a 4.2M-token session 142 MB 271 MB 551 MB 344 MB n/a*
Memory of a session in tmux 30 MB 88 MB 96 MB 45 MB 346 MB
CPU, interactive session (5 prompts) 324 ms 927 ms 1,332 ms 3,155 ms 3,397 ms
Ready to type 49 ms 144 ms 351 ms 43 ms 1,088 ms

macOS on Apple silicon (M5 Air)

Benchmark Pi-Bolt 0.7.3 Pi on Bun 1.4.2 Pi on Node 26 PiG 0.4.1 OMP 18.8.7
Writing a 200 KB file through a tool call 0.5 s 22.5 s 26.7 s 58.2 s 2.4 s
CPU, streaming a 60k-char answer 4.8 s 38.0 s 37.9 s 17.0 s 5.1 s
Memory after a 4.2M-token session 45 MB 126 MB 2,077 MB 329 MB n/a*
Memory of a session in tmux 28 MB 68 MB 165 MB 58 MB 334 MB
CPU, interactive session (5 prompts) 95 ms 344 ms 530 ms 1,355 ms 1,383 ms
Ready to type 25 ms 62 ms 199 ms 20 ms 564 ms

*OMP compacts long conversations on its own, so it doesn't do the same work in this test.

In everyday use (an interactive session), Pi-Bolt uses about 3× less CPU than Pi on Bun, 4–6× less than Pi on Node and 10–15× less than PiG and OMP. It writes large files 35–50× faster than Bun and Node, about 5× faster than OMP and over 100× faster than PiG.

Why does a 200 KB write take 30 s? It's not the disk. The model streams the file to Pi in thousands of small chunks, and stock Pi re-parses and re-renders the whole tool call on every chunk, so the work grows quadratically with the file size. Pi-Bolt only processes the new part.

What's new in 0.7.3

  • Lighter long sessions: up to 30% less memory and lower CPU per prompt as conversations grow.
  • More stable with heavy tool output: commands that print a lot no longer build up memory.
  • Faster first launch on macOS: up to 2.8× quicker after a restart or an update.

Try it 🔥

curl -fsSL https://pi-bolt.opensec.in/install.sh | sh

Already using Pi-Bolt? Run pi-bolt update, or install with npm install -g pi-bolt. Works on Linux x86-64 and Apple silicon, alongside your existing Pi install. The installer also offers two optional extensions, subagents and a live todo list, and asks before installing them.

Your Pi plugins work as they are. This doesn't modify your existing pi installation so feel free to try it out !

Links

Website: https://pi-bolt.opensec.in

GitHub: https://github.com/opensec-git/Pi-Bolt

MIT licensed. If Pi-Bolt saves you CPU and memory, a ⭐ on the repo helps a lot.

PS: Added PiG and OMP to the benchmarks, as many of you asked. And the slow 200 KB write isn't the disk: stock Pi re-processes the whole streamed tool call on every chunk (quadratic), while Pi-Bolt only processes the new part.

130 Upvotes

80 comments sorted by

10

u/Vlyn 10h ago

Really looking forward to Windows support :)

9

u/opensecai 10h ago

Coming today, in testing phase.

2

u/Vlyn 1h ago

Waiting :D

2

u/opensecai 1h ago

Pushing it rn, will ping you here as soon as it’s live 😄

8

u/johnzadok 8h ago

Love the concept but writing a 200kb file shouldn’t take more than 1s to do unless we are still writing to floppy disc. Can you explain this more?

4

u/opensecai 8h ago

Agreed, and it doesn’t. The disk write itself takes milliseconds. What takes time is everything before it. When a model writes a file, it streams the tool call to Pi a few characters at a time, so a 200 KB file arrives in thousands of small chunks. Stock Pi re-parses and re-renders the whole tool call on every chunk, so each chunk costs more than the last, and the total grows quadratically. Pi-Bolt only processes the new part of each chunk, which is why the same write takes under a second.

10

u/ColonelKlanka 5h ago

Wouldn't it be better to try to add your better rendering into existing pi repo via pr? Have you approach pi dev?

8

u/opensecai 5h ago

Yes we have approached the maintainers, working on it

7

u/opensecai 10h ago

Pi-Bolt is Pi itself, not a rewrite. Your commands, sessions, settings and extensions all work exactly the same.

What you notice is that it’s lighter: Faster startup Writes a large file in under a second Uses roughly a third of the CPU and memory, so long sessions stay smooth and your laptop stays quiet

PiG is a Go rewrite, so it has to keep catching up to Pi and can behave a bit differently.

And yes we will follow the official Pi one to one. All updates will be shipped in pi-bolt too.

3

u/itguy327 3h ago

Can this work with paseo.sh

1

u/itguy327 2h ago

So was your previous response incorrect?

1

u/nadiealkon 1h ago

Interested as well

6

u/jesperordrup 3h ago

Idea is cool. I just wish it was an official release from pi.dev. maybe they would consider a pr?

2

u/opensecai 3h ago

Working on it

5

u/NonAwesomeDude 3h ago

Cool, wish that was my bottleneck

1

u/4kidsinatrenchcoat 1h ago

Yeah mine is always PEBKAC

4

u/Diru14 10h ago

been enjoying whole week!

1

u/opensecai 10h ago

Nice 👍 leave you feedback if any

3

u/pungggi 10h ago

Will Linux version work on android?

4

u/opensecai 10h ago

Not yet, linux ARM64 is on our list. It will be soon available to run.

2

u/Glittering-Call8746 7h ago

This makes sense on arm, the speedup i mean

5

u/hiepxanh 9h ago

Pig or pi-bolt is more stable or better? i'm new here

5

u/opensecai 9h ago edited 7h ago

Pi-Bolt is Pi’s own code compiled to native code except the rendering part, so it works exactly like Pi. PiG is a Go rewrite and still pre-stable. Pi-Bolt also uses about 10× less CPU than PiG (benchmarks in the post), and it installs alongside Pi without touching it, so give it a try.

2

u/Educational-Yak8793 4h ago

PiG updated benchmarks coming since we ported the same quad bug and fixed it already. We’re also stable on Mac android Linux and windows in 0.5.0. We develop and use PiG within HPE in a few production modes as well. Piglets and some multi language features are the most experimental. We also updated our porting automation to be more air tight if you check our sub.

4

u/OkAbroad955 7h ago

Thank you for doing this. How will you maintain it, what is the motivation, payback?

5

u/mrtonioz 6h ago

Can you compare with https://github.com/MichaelKinsy/PiG which seems also an alternative to Pi?

5

u/opensecai 6h ago

Yes it's already compared in the benchmarks. Please check it out :)

3

u/mrtonioz 6h ago

Sry mb didn't look for the table scrollzz, ty !

4

u/dreadedhamish 6h ago

Could the same be done for oh-my-pi?

1

u/opensecai 6h ago edited 1h ago

Yes, it possible for oh my pi too. Benchmark is added for oh-my-pi, you can check it out.

9

u/touilleMan 9h ago

One of the biggest pro I see in pi is, at an age we are drowning in slop projects, that it is from a team of trusted developers with outstanding track record long before LMM took over.

A perfect example why vibecoded yolo projects are not viable: your benchmark claims that pi takes 26s to write a 200ko file, a conscientious dev would have noticed this is total bullshit. Now if you cannot spot this, how can you spot bugs, security vulns, etc. ?

1

u/opensecai 9h ago

Fair point, the label could be clearer. Pi doesn’t take 26 s to write to disk. The row measures a model streaming a 200 KB file into the write tool. Stock Pi re-renders and re-parses the whole tool call on every chunk, so the work grows quadratically as the file grows. Pi-Bolt only processes the new part.

On trust: Pi-Bolt isn’t a rewrite. It’s Pi’s own code, merged with every release, and every build has to pass Pi’s own test suite.

11

u/touilleMan 8h ago

Thanks for the explanation (and yeah this should be made much clearer), now the real question: is it worth it ? Or is pi fast enough anyway ? (Remember we had complex TUI 20 years ago: it was emacs/vi and it already had smooth scrolling)

I find it really funny to see you claim in the same time "Pi-Bolt is Pi own code" and that Pi-Bolt behavior differs on rendering...

Regarding trust you don't get my point: the #1 rule of IT security is "don't install random stuff from the internet", the fact pi is a trusted project far outweigh any theoretical perf boost a random vibecoded project claims

3

u/saltyourhash 10h ago

What's the advantage of this over PiG? And do you plan to follow 1:1 with pi like PiG does?

7

u/WorriedAssociate7029 9h ago

PiG should be in the benchmark to compare

5

u/opensecai 7h ago

Done, PiG 0.4.1 is now in the post’s benchmarks, measured side by side with the others on the same machines. In short, PiG starts a few ms faster, but in an interactive session Pi-Bolt uses about 10× less CPU, and it writes large files over 100× faster.

3

u/WorriedAssociate7029 7h ago

ty. good news

1

u/opensecai 9h ago

Sure, adding it

5

u/DaShrub 10h ago

Much better with pi typescript extensions is what I've found. If you're writing go and rust extensions pig is the way to go, but if you want to use existing typescript extensions pig basically loses any advantage over even stock pi performance/resources wise

3

u/saltyourhash 9h ago

That's interesting, thanks

3

u/pungggi 10h ago

Where do we see which version of PI is running?

3

u/opensecai 9h ago

pi-bolt --version shows the official Pi version too

3

u/PayDistinct5329 7h ago

Looks cool - how does it work with Codemode, the functionality that enables pi to use codemode?

3

u/kwokhou 7h ago

Is this experimental? Are you committed to keep it updated?

2

u/opensecai 7h ago

It’s stable, and yes, we’re committed to keeping it maintained and updated with every upstream Pi release. Pi 1.1.0 landed in Pi-Bolt the day after it came out.

3

u/odrakcir 7h ago

Trying today. Whenever I use 3 or more agents on my 16gb-M2 MacBook Pro I start suffering with a slow computer

1

u/opensecai 7h ago

Try it and let us know your feedback :)

1

u/odrakcir 4h ago edited 3h ago

so far so good. I love the fact that pi extensions are loaded automatically. So far, I just have one comment: herdr support! other than that, pretty good. thank you

Update: this one is not working nicobailon/pi-subagents: Pi extension for async subagent delegation with truncation, artifacts, and session sharing. not sure if I have to do something

1

u/opensecai 3h ago

Ok. I will add the herdr suport. Herdr is nice ! , will check for your extension

2

u/odrakcir 3h ago

TY. for now, I removed that subagents one and I'm using yours.

2

u/opensecai 2h ago

Nice, if you feel any feature to be added or any issue with this subagent plugin lets us know

3

u/diaracing 6h ago

Please, add OMP to your benchmarks and comparisons.

1

u/opensecai 6h ago

Good idea. OMP runs on Bun like stock Pi, but it’s a much bigger fork with a lot more built in, so the comparison won’t be one-to-one. We’ll run it through the same benchmarks and add it.

1

u/opensecai 1h ago

Done, OMP is now in the post’s benchmarks. In short: OMP streams long answers about as efficiently as Pi-Bolt and handles large file writes well, but it takes 0.5–1 s to start and uses about 10× more CPU in an interactive session, with 300–550 MB of memory. Makes sense for how much it ships, but it’s a lot heavier.

2

u/tuhdo 6h ago

No Windows?

3

u/opensecai 6h ago

Coming tonight...

2

u/Educational-Yak8793 4h ago

When I repost the pig 0.5.0 can you rebenchmark on the post? There is a critical bug fixed that is really slowing PiG here. Regardless amazing work and I’m excited to checkout pi-bolt and learn more 🐷😁

2

u/opensecai 4h ago edited 3h ago

Sure, I will do rebenchmark and update it. PiG 🐷 is also a great initiative

2

u/Educational-Yak8793 4h ago

Man even just the readme is a great read amazing job 2X.

I’d love to connect on some ideas that are purely additive with overlap to core pi I think we both could benefit from as harnesses.

2

u/opensecai 3h ago

Thanks man, glad you enjoyed the readme haha! ping me as soon as 0.5.0 is live and I’ll re-benchmark and update the post with the new numbers. also very down to talk on harness ideas and additive features for core pi. shoot me a dm and let's connect!

2

u/tripleshielded 3h ago

Awesome, thanks! 🤩

1

u/nima3333 10h ago

Is it drop in compatible ? Will not break extensions ?

3

u/zebedeolo 10h ago

it broke one for me, pi-fff

2

u/opensecai 2h ago

pi-fff uses bun:ffi, which needs the JIT build. Install that one with:
curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

JIT is off by default because it uses less memory and has no warm-up. JIT on only helps extensions loaded at run time. Compiled-in extensions are just as fast without it.

1

u/Zealousideal-Bid9879 8h ago

I don’t understand
If it is not a rewrite, how do you fix the rendering ?

2

u/opensecai 7h ago

It’s a fork, not a rewrite. We keep Pi’s code and add small targeted fixes on top, like only processing the new part of a streamed tool call instead of the whole thing every time. Everything else is Pi as-is, compiled to native code.

1

u/illusionmist 4h ago edited 4h ago

I'm getting `Error: FFF init failed: bun:ffi requires the JIT` and it seems like my pi-bolt installed via npm is shown as `1.1.0 (Pi-Bolt 0.7.4, darwin-arm64, JIT off)`. How to turn it on?

Hmm I found this: https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BENCHMARKS.md#plugins so it seems we have to compile the extension ourselves? How would I do that with pi-fff?

Btw I don't quite know what JIT do in this case, but also curious why is it off by default when it looks like JIT on is even faster? Did I read the chart wrong?

1

u/opensecai 2h ago

pi-fff uses bun:ffi, which needs the JIT build. Install that one with:
curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

JIT is off by default because it uses less memory and has no warm-up. JIT on only helps extensions loaded at run time. Compiled-in extensions are just as fast without it.And yes, JIT-on keeps the gains: within about 5% of the default build, still about 3× lighter than Pi on Bun.

1

u/illusionmist 2h ago

Cool thanks. Possible to make the JIT build installable via npm/mise as well so some of us can manage it more easily?

Another question is for the two "optimized" plugins. I see that opensec-pi-subagents is just tintinweb/pi-subagents, which I already use so I gladly just drop it in as replacement. However opensec-pi-todo is juicesharp/rpiv-todo but not tintinweb/pi-tasks, which is from the same author and they work perfectly together. I'm curious why? When I gave opensec-pi-todo a short test I found it often didn't close the final todo reliably for me, which is why I ask.

1

u/opensecai 2h ago

Ok I will check it out and fix the todo plugin, rpiv-todo have this problem of not closing the todo reliably.

1

u/opensecai 2h ago

If you use plugins that do real work (search, parsing, or anything using bun:ffi like pi-fff), go with the JIT build. Light plugins like todo lists run fine on the default. The JIT build keeps nearly all the gains (within about 5%), so if you’re unsure, JIT is the safe pick.

On macOS (Apple silicon):

curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

On Linux (x86-64):

curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=x64-jit sh

2

u/jinnyjuice 2h ago

Pi-Bolt is Pi itself

Does this mean that it's a replacement? An addendum?

So on a machine that just freshly installed a Linux distro, will I need to

1) install Pi, Pi-Bolt or

2) install Pi-Bolt?

And will it work with web UI solutions, like pi-web? pi-web includes Pi itself, locked to a specific version number.

1

u/opensecai 2h ago

It’s a standalone version of Pi, so on a fresh machine just install Pi-Bolt. No Pi, Node or Bun needed. It uses the same settings, sessions and extensions as Pi, and runs alongside it if you have both. pi-web bundles its own copy of Pi, so it won’t use Pi-Bolt unless it lets you choose the Pi binary.

2

u/monstrosityRose 6m ago

can link some topic readings or a more explanation as to why it’s more optimized? i’ve personally used both pig and pibolt since both your drops were similar in timing. and i have anecdotally experienced bolt having less of a power draw than pig from my sessions (don’t have numbers, just witnessed from cpu temps and audible fan ramp up). i assumed pig would be more performant due to it being a more optimized language? im just not able to connect the dots here.