Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
AWS SDK
The official AWS SDK for .NET. For more information on the AWS SDK for .NET, see our web site:
Interesting, because `this = default` apparently triggers zeroing in a simple case. So results from this PR could be investigated. Maybe because there are nested structs?
I always just do this = default; in this situation and expect the JIT to provide any potential optimizations. I didn't do the measurement myself, but the benchmarks ran against this PR showed that this = default; was ever so slightly faster. More importantly, it doesn't have the word "Unsafe" in it, so we can all sleep better at night.
I'm not trying to criticize their implementation though, I think it is sound but perhaps a bit overwrought in this particular area. I will, on the other hand, level some criticism against the AWS implementation, yikes.