dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.37k stars 189 forks source link

[NativeAOT-LLVM] Enable bulk memory by default and as a baseline #2628

Open SingleAccretion opened 1 week ago

SingleAccretion commented 1 week ago

Zeroing memory (for the GC) is the biggest contributor to startup in a hello world app. We should unconditionally enable bulk memory to mitigate this.

Note that this implies enabling it for the native runtime binaries, although we should of course also enable it for code compiled with ILC. Since we do not want to ship multiple kinds of runtime binaries, any option enabled in this manner becomes a hard requirement - which is ok for bulk memory as it is pretty widely supported.

To ensure there is a single source of truth for all code (runtime and compiler-produced), there should be a central list of compilation options like this, which is then read in by both the CMake scripts and build integration targets.