6 ms·
> It really sounds like a job for Java Why?
by adwn 1y ago
> It really sounds like a job for Java
Why?
- dontlaugh 1y agoBecause the JVM's JIT does already specialise based on runtime values.
- nurettin 1y agoHotspot (TM) JIT compiles java code to machine code when it detects hot code paths, speeding up execution during runtime, exactly the use case described in the article.
- adwn 1y agoDoesn't Hotspot have notoriously long warm-up times? Have those been exaggerated, or have they recently improved? If you know beforehand that you'll execute some piece of code many times, the most efficient approach is to JIT-compile it right away, and not only after a lot of time has passed.
- eddythompson80 1y agoThey have not been exaggerated and they have not improved (well, nothing outside standard, keeping up with inflation, type improvement) The JVM ecosystem has given up on jit warm up time for hotspot. There are other solutions like graal. Whenever I have to deal with Java projects I'm always astonished at how completely "normal" a 4 minute startup time for a REST endpoint project on a single core machine.
- nurettin 1y agoI don't know the latest metrics, I remember java servers being slow at first, then gradually picking up momentum. Are you saying that Java doesn't do what the article describes?
- adwn 1y ago> Are you saying that Java doesn't do what the article describes? That's right, Java doesn't do what the NativeJIT library does: Hotspot starts in an interpreted mode and only later JIT-compiles frequently executed code; NativeJIT, in contrast, immediately compiles the generated code, at least according to this description: Bing formulates a custom expression for each query and then uses NativeJIT to compile the expression into x64 code that will be run on a large set of candidate documents spread across a cluster of machines. I don't know the specifics, but my guess is that by the time Hotspot would even start compiling, the user has already received the results for their query. Ergo, Java – at least with the Hotspot VM – wouldn't be suitable for this task.