What is Nostr?
Howard Chu @ Symas /
npub1tt4…x9ud
2023-08-31 03:31:57
in reply to nevent1q…efj3

Howard Chu @ Symas on Nostr: npub1qnnjp…gw7ad wow that's a lot of overhead, 2.7MB test data turned into 18MB of ...

npub1qnnjpjm3gctvgewlz0pc8hk8tzu0gewskh4fewgmuvjm9kw2l4usagw7ad (npub1qnn…w7ad) wow that's a lot of overhead, 2.7MB test data turned into 18MB of static code.

We can store live C structures as records in #LMDB, using a fixed-address memory map so that the address range of the map stays constant. There's a serialization cost to aggregate any pointer-based fields, but zero deserialization cost.

E.g.,

typedef struct foo {
char *name;
char *phone;
} foo;

foo rec1 = {"joe", "5551212"};

Must be stored as:
Author Public Key
npub1tt4j2zeswksjh5z7zmy283qd4yd920afy9j28xg45wsxzhl9rpjqrex9ud