4 ms·
this is a myth, AOT is generally slower than JIT for high level languages. Yes though prewarming is underused and important see e.g. https://github.com/facebook
by SemanticStrengh 4y ago
this is a myth, AOT is generally slower than JIT for high level languages.
Yes though prewarming is underused and important see e.g. https://github.com/facebook/nailgun https://github.com/facebook/nailgun
- Shadonototra 4y agoit's not a myth, it is a well documented overhead do a google search a audio VST, a game, a CLI are not servers where JIT makes more sense (sometimes)
- SemanticStrengh 4y agominecraft is not faster on GraalVM AOT nor will be every Unity Game out there. C++ is faster but not because it is AOT, it's because it is a lower level language which is more brittle and less permissive/dynamic. AOT on high level languages reduce throughput for most uses, even with PGO.
- Shadonototra 4y agoUnity games now ship with IL2CPP, to benefit from AOT compilation, the language and its constructs remains the same, gone are the stutters people were experiencing Minecraft was rewritten in C++ to increase performance on lower end devices and overall general performance (no longer need to warmup JVM to remove the stutters during gameplay, lower downtime for restarts in realm based servers) https://old.reddit.com/r/Minecraft/comments/i27zzo/5_ways_the_slow_minecraft_problem_can_be_fixed/ https://old.reddit.com/r/Minecraft/comments/i27zzo/5_ways_th... We can talk all day about high/low level languages, JIT/GC introduce overhead, that's it When you only have 8ms for your framebudget at 120hz, every bit make the difference The rest is handled on the GPU anyways, AOT compiled ;)
- SemanticStrengh 4y ago> Unity games now ship with IL2CPP, to benefit from AOT compilation No that is cheating, IL2CPP is a C# to C++ transpiler.. Which is similar to writing a C++ program, interesting technology though. However it's true Unity also has a Burst compiler which is AOT is release mode and output LLVM IR. Look that is interesting and that is exactly where I wanted the conversation to go. GraalVM is generally slower on AOT than on JIT. I expect the same from .NET 7 AOT (haven't checked but is likely true) Unity Burst is interesting because it leverage an infrastructure that has received an enormous number of human resources and optimizations for AOT (LLVM). However Unity does not allow to benchmark Burst vs modern .NET JIT so it's very possible that Burst is in many cases slower than .NET JIT. This can't be verified easily and I'm not aware if Burst can be used outside of Unity but I guess one could write the same microbenchmark for both, it's just that no-one did it. However, Unity has gained a lot of technical debt because its own tooling (and Mono) are stuck on .NET 4.x They are apparently actively seeking to update their support and will leverage CoreCLR to some extent so maybe once it will be done, comparisons will become easier and they might or not replace Burst by regular CoreCLR, time will tell. https://forum.unity.com/threads/gdc-2022-the-future-of-net-and-unity.1255956/ https://forum.unity.com/threads/gdc-2022-the-future-of-net-a... https://forum.unity.com/threads/net-6-support.1059992/ https://forum.unity.com/threads/net-6-support.1059992/ > Minecraft was rewritten in C++ C++ is faster because it is lower level, my point is Minecraft do not use Java AOT. and as said many of minecraft stutters are avoidable GC pauses. It's true 8ms is a tight budget indeed hence why ZGC is a key advance, a place where C# is currently inferior to java. > The rest is handled on the GPU anyways, AOT compiled Haha nice try, I appreciate the tentative but I'm not sure you're being right. regarding the topic of compiling shaders for a 2D GUI, using a JIT is a key advantage, see e.g. https://github.com/blend2d/blend2d https://github.com/blend2d/blend2d As for GPU drivers (handling openGL/etc) I think its a mix of both but I have forgotten the things I had read about them on phoronix Most game emulators strongly benefit from JITs shaders too.
- pjmlp 4y agoJust like C++ and Objective-C were cheating when they came into the world, as C macro processors? Are we using two weights here?
- 4y ago
- withinboredom 4y agoIt’s isn’t about raw speed, but a consistent speed. JIT usually requires pausing the world to JIT. You don’t want that with audio.
- SemanticStrengh 4y agodisagree, an audio application (e.g. a livestream) will have audio changing at runtime, therefore, the critical hot and cold codepaths change at runtime, which a JIT will handle optimally with dynamic optimizations and deoptimizations. A statis PGO profile can and does help AOT by marking functions as cold and hot however a single profile is very weak/unsufficent against the general variety of runtime uses/inputs. Hence a JIT is much more usage resilient in its performance profile, aside from the initial (and pre-warmable) cold start.
- withinboredom 4y agoYou can disagree if you want to, but that doesn’t change the facts.
- SemanticStrengh 4y agoyour disagreement doesn't change the fact AOT programs can become pathological by their a priori and not a posteriori tagging of hot and cold functions but hey free country, not assimilating valid arguments and being in denial is a human right. Also I realize you said "pausing the world", are you confusing JITs with GCs? Or enlighten me what in a JIT induce a stop the world pause besides a GC. As for this, it is hortogonal indeed, AOT java/C# still has a GC and has indeed SOTA submillisecond GC pauses with e.g. ZGC.
- withinboredom 4y agoThe fact is you don’t want unpredictable latency when processing audio. JIT produces unpredictable latency. This is a fact. You are saying that doesn’t matter, because in the end it is faster, but it totally misses the point about latency.