while (i < n1 && j < n2) {
Eventually my research led me to .NET Native AOT. Normally C# gets compiled into an intermediate language that only gets compiled down to platform-native code on-demand via the common language runtime. However, through Native AOT, a C# project can be directly compiled into platform-native code. This seems promising, but there’s a major problem. Native AOT is only officially supported on Windows and Linux. We also need to ship on Xbox and PS5.
。Line官方版本下载对此有专业解读
Finding these optimization opportunities can itself be a significant undertaking. It requires end-to-end understanding of the spec to identify which behaviors are observable and which can safely be elided. Even then, whether a given optimization is actually spec-compliant is often unclear. Implementers must make judgment calls about which semantics they can relax without breaking compatibility. This puts enormous pressure on runtime teams to become spec experts just to achieve acceptable performance.
[10] M. Roberts: “The Unreasonable Effectiveness of Quasirandom Sequences” (2018). ↑