2 ms·
> C++/CLI is slower than normal C++ 1) IIRC CLI is managed AKA garbage collected (BTW managed C++ is common practice e.g. chromium) 2) human resources, c++/cli
by SemanticStrengh 4y ago
> C++/CLI is slower than normal C++
1) IIRC CLI is managed AKA garbage collected (BTW managed C++ is common practice e.g. chromium)
2) human resources, c++/cli has received much less optimization effort than LLVM/GCC/C#
as for Java https://github.com/oracle/graal/issues/1069#issuecomment-473649871 https://github.com/oracle/graal/issues/1069#issuecomment-473...
Go is the proof that GC-ed languages can be fast via AOT so it is not the discriminating factor.
I suspect C++ with a GC is not much faster than JITed C# and the rest would be explained by other language brittleness such as e.g. the vtable hell, monomorphisation, etc
Also weirdly, LLVM and GCC have received much more optimization human resources than openjdk and coreclr
> But AOT vs JIT has some other aspects. Like with Blazor who, at first, ran under a .NET virtual machine which ran under WebAssembly Virtual Machine. With AOT, things are simpler.
well yes for this special case
- WorldMaker 4y ago> IIRC CLI is managed CLI compiles to MSIL and runs on the CLR, so yes, very managed by default. > c++/cli has received much less optimization effort than LLVM/GCC/C# C++/CLI also found no regular users and people have been warned not to use it from even just months after its original release. From certain perspectives: It has really only had the one release in 17 years and been a "legacy tool" for most of that time. (Possibly two releases if you count C++/CX, though that doesn't run on the CLR and is its own weird one-off thing for COM weirdness.)