3 ms·
> 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 interpret
by 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.
- nurettin 1y agoAh ok pedantism that's fine thanks.
- adwn 1y agoThat's not "pedantism". Java+Hotspot are literally unfit for the task at hand.
- nurettin 1y agoThey specifically mentioned compiling at runtime in the article. I cannot be convinced otherwise. Sorry.
- adwn 1y agoI started typing a reply to explain that "compiling at runtime" does not mean "having a warm-up phase before JIT-compilation", but this: > I cannot be convinced otherwise. made me think "why bother?". If you insist on being wrong, go on being wrong.
- nurettin 1y agoWell if you insist, this is what makes me think that there is a gradual process of compiling and running native jitted code as the project runs. Hence, runtime. > The scoring process attempts to gauge how well each document matches the user's intent, and as such, depends on the specifics of how each query was phrased. 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. If this is "wrong" to you, then I would like to remain wrong. In fact I would like to have my mental faculties as acutely orthogonally aligned as possible compared to yours in every possible dimension.
- adwn 1y agoThe difference between Hotspot on one hand and Bing's use of NativeJIT on the other is that after code generation (the "formulates a custom expression" part), the code is immediately JIT-compiled to machine code, while Hotspot would first interpret the generated code for a while and collect execution metrics before it JIT-compiles the code. This delay between code generation and compilation to machine code would be unacceptable for Bing's use case, hence why Java+Hotspot aren't suitable for this task. Hope this clears it up.
- nurettin 1y ago> the code is immediately JIT-compiled to machine code As I said multiple times, we disagree on this point. There is a scoring process during runtime which mirrors what hotspot does in the non-literal sense. And again, I'm ok with being "wrong" so off you go.
- adwn 1y agoThe "scoring process" is the generated code, which scores a page's relevance to the user's query. It has absolutely nothing to do with gathering runtime metrics about the generated code, nor with optimizing the performance of the compiled machine code, which is what Hotspot does.