Per Vognsen on Nostr: While this has nice ergonomics, I take exception to the idea that it's zero-copy: As ...
While this has nice ergonomics, I take exception to the idea that it's zero-copy:
https://manishearth.github.io/blog/2022/08/03/zero-copy-3-so-zero-its-dot-dot-dot-negative/As soon as your types have references (e.g. the Person struct example), the operating system loader has to do pointer fix-ups on load. And because this usually happens with the additional overhead of copy-on-write soft page faults, I could see this being significantly slower than equivalent non-copy-on-write pointer fix-up code. I'd have to do proper testing.
Published at
2023-08-31 03:00:52Event JSON
{
"id": "27c0f0e00046b0cf4ece22951f1421a7b909c8759dd4a01e2ae86762d21166e8",
"pubkey": "a297d2ef6a36a76aa5241cfc4c0ab5ab13e37ab15aaa46b48dabd8cc3ace895c",
"created_at": 1693450852,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/pervognsen/statuses/110981995075150327",
"activitypub"
]
],
"content": "While this has nice ergonomics, I take exception to the idea that it's zero-copy: https://manishearth.github.io/blog/2022/08/03/zero-copy-3-so-zero-its-dot-dot-dot-negative/\n\nAs soon as your types have references (e.g. the Person struct example), the operating system loader has to do pointer fix-ups on load. And because this usually happens with the additional overhead of copy-on-write soft page faults, I could see this being significantly slower than equivalent non-copy-on-write pointer fix-up code. I'd have to do proper testing.",
"sig": "fab041cbb2fbf5681ab416c559d8bde60d6bb91be0d47e7dbfadf36aad55e774a8fb9fc551c1016f29a411c46855d9cd87ad3c0127d1bcfc70d30dde185c754f"
}