logoalt Hacker News

benterixtoday at 5:07 PM3 repliesview on HN

> JIT warmup is real. The first call to any method pays the compilation cost. In a database engine, the first transaction after startup shouldn’t be 100x slower than the steady state.

Correct me if I'm wrong but isn't it what aot was supposed to solve?


Replies

nycdotnettoday at 7:47 PM

In the section “Hardware-accelerated WAL checksums” he explains how the JIT compiles away the hardware support stuff depending on the exact capabilities of the system its on. With AOT you don’t get this - it’s way more coarse like x64 vs ARM

pjc50today at 8:30 PM

Eh, I don't see that as a huge deal because the first thing the DB has to do is warm up the disk cache, at least for the indexes. Of course the first call is slow.

landl0rdtoday at 6:40 PM

AOT is a little fussy in real-world usage particularly for things like reflection. You can probably force it to work but it may make your code much uglier.

Span<T> is more important for performance TBH JIT warmup isn't a huge issue for a long-running process

show 3 replies