Replying to @xiaomovps
Both great projects!
I’m hoping to add pi-rs to a Pi oriented benchmarking repository I’ve been working on to help harness developers test/improve their implementations - michaelkinsy.github.io/buffo…
Also of course must recommend, PiG as well for another performant option github.com/MichaelKinsy/PiG 🐷
10
399
PiG is MIT licensed, and it is free forever. Here just for the love of the game and going ham.
Big thanks to the @pidotdev team for building the thing we get to follow, to Pi-Bolt for its open benchmark suite that showed us our slowest paths, to durable-bench, and to everyone who contributes their work to open source. 🐷
Some numbers from Buffon (michaelkinsy.github.io/buffo…) which is the repository I made to benchmark harnesses related to Pi use cases. All the numbers are CPU milliseconds on the same machine, and lower is better.
The command pig --version takes 5 ms in PiG. In Pi on Node, the same command takes 282 ms. One prompt with tools takes 29 ms in PiG and 518 ms in Pi. Streaming a long answer in the TUI took 2,451 ms in PiG 0.4.1. In 0.5.0, it takes 403 ms.
PiG also loses in some places. Pi-Bolt is a little ahead on interactive start and on resuming a long session. TypeScript extensions add a fixed startup cost, because PiG starts a separate Node host for them. With 10 TypeScript extensions, one prompt takes 934 ms in PiG, 676 ms in Pi and 109 ms in Pi-Bolt.
If you port your extensions to Go, most of that cost goes away. In our own run (not buffon), the same 10 extensions as a Go Piglet took 67 ms in print mode, which is less than Pi-Bolt's 109 ms. In RPC mode the Go Piglet took 521 ms and Pi-Bolt took 194 ms, so Pi-Bolt is still ahead there. The Go and TypeScript extensions were checked to behave the same, and the run is labelled provisional. Scripts and raw data are in go-ext-comparison.tar.gz.
You can rerun the buffon numbers yourself 🐷







