Re:Karmem: A fast binary serialization format faster than Go...
by dolmen on Monday August 01, 2022 @05:13AM
(#32303624)
Size of generated code matters when the target is WASM to run in browsers.
[ Parent
| on HN ]
Re:Karmem: A fast binary serialization format faster than Go...
by londons_explore on Monday August 01, 2022 @07:47AM
(#32304665)
But only if you have a lot of message formats...
Generally, message specifications are written by hand, so even a big project may only have a couple of hundred. Doesn't sound so bad.
Also, presumably, if code size really is a big concern, you can decode this in more code efficient ways too, as long as you are less concerned with performance.
Re:Karmem: A fast binary serialization format faster than Go...
by quotemstr on Monday August 01, 2022 @08:36AM
(#32305088)
You might be surprised to see how quickly mechanically-generated marshaling code adds up. Look at Android's frameworks.jar one day and see how much is just the same AIDL-generated Parcel-manipulation code over and over again. Cache effects and IO costs are so severe in modern computing that my default (but rebuttable!) position is to prefer table-driven approaches over code generation wherever possible.
Windows COM switched from codegen to table-driven "stubless" marshaling decades ago at no noticeable cost to performance and with a huge code size win.