Abdel on Nostr: Me today: write BDHKE scheme in Zig (). Benchmark it: Oh wow it's super fast, 1 ...
Me today: write BDHKE scheme in Zig (
https://github.com/AbdelStark/coconut).
Benchmark it: Oh wow it's super fast, 1 millisecond for the end to end scheme.
Find the Rust implementation (
https://github.com/ngutech21/moksha) and benchmark it: it's about 10 times faster than my Zig implementation 😭
Gg Moksha folks! 🦀 is blazingly fast damn.
I suspect there might be a gap in terms of performance between the Secp256k1 implementation of the Zig std lib and the C implementation (the secp256k1 crate being a Rust wrapper library for Pieter Wuille's libsecp256k1 in C).
Zig benchmark:
Rut benchmark:
Published at
2024-08-08 13:25:30Event JSON
{
"id": "349c8ebb8794d91d956efe4a955fd70a68759bb86b3b04b6e1c60b7edf22262d",
"pubkey": "b8f4c2e90f0dd667121533d7b8dafd77384b0b5051f8272e5493c58f7f93e14b",
"created_at": 1723123530,
"kind": 1,
"tags": [],
"content": "Me today: write BDHKE scheme in Zig (https://github.com/AbdelStark/coconut).\nBenchmark it: Oh wow it's super fast, 1 millisecond for the end to end scheme.\nFind the Rust implementation (https://github.com/ngutech21/moksha) and benchmark it: it's about 10 times faster than my Zig implementation 😭\n\nGg Moksha folks! 🦀 is blazingly fast damn.\n\nI suspect there might be a gap in terms of performance between the Secp256k1 implementation of the Zig std lib and the C implementation (the secp256k1 crate being a Rust wrapper library for Pieter Wuille's libsecp256k1 in C).\n\nZig benchmark: \nhttps://m.primal.net/JsUV.png \n\nRut benchmark:\nhttps://m.primal.net/JsUX.png \n",
"sig": "2877cbdbc9f5e1462fbfd936a242c03e1d1d5e402ba02cff951efd07da2598ba29ef870d362ce357e1ac0afa93b607fef5877f735dca732877ebfdb692c4bbac"
}