5d0e723e
bench: starwing cross-runtime comparison harness
Adds bench/starwing_bench.lua, a sibling to bench/bench.lua that
runs the same Person and BenchPayload payloads through Starwing's
lua-protobuf (installed as a rock at .rocks/lib/tarantool/pb.so)
instead of our pure-Lua pb runtime. Same payload shapes, same
iteration counts, same measurement loop — so the two outputs
line up column-for-column.
Loading approach: strip runtime/ off package.path so the `pb`
module name resolves to starwing's C module. We use
package.loadlib to grab `luaopen_pb` from the .so and inject
into package.loaded before require('pb') has a chance to hit the
Lua-path loader; starwing's pb.option('int64_as_number') matches
the regime our bench/bench.lua exercises (bench payloads stay in
the Lua number range, avoiding per-call cdata allocation noise).
bench/starwing/{hello.pb,proto2_basic.pb} are the FileDescriptor
binaries starwing's pb.load() consumes; produced by mainline
protoc --descriptor_set_out from the same .proto sources we
generate Lua from.
Mirrors bench/go/'s role for Go (`bench: Go cross-runtime
comparison harness`, 07eef11) but for the in-Tarantool C-module
alternative — answers "how do we compare to the C-module
incumbent on the same host" rather than "how do we compare to
mainline C++/Go on a different host."
Eugene Blikh <bigbes@gmail.com> — 2026-05-18 19:51:12 UTC
Commit 5d0e723e5907b2b93c8e6669e6aeb48cf0c4898c —
view raw patch
Parent(s):
4b91822d
| File | Status | + | − |
|---|---|---|---|
bench/starwing/hello.pb
BIN
|
A | ||
bench/starwing/proto2_basic.pb
|
A | +21 | |
bench/starwing_bench.lua
|
A | +223 |