3 ms·
Another technique used with Java is setting the memory really high, run it for a while against mock data until it's warmed up and the compiler has JITted out al
by xmcqdpt2 4y ago
Another technique used with Java is setting the memory really high, run it for a while against mock data until it's warmed up and the compiler has JITted out all the allocations and then move to real data.
If the mock data is good, you can do the whole thing in testing and fail tests if new code introduces GC events. However the Java code you have to write end up being very C like.
- dan-robertson 4y agoThe notion of the JIT warming up is nowhere near as rosy as most people believe. In particular, it is neither true that the JIT will lead you to your program performing at a steady level, nor that such a steady level will be faster than what you started with. C.f. https://tratt.net/laurie/blog/2018/why_arent_more_users_more_happy_with_our_vms_part_1.html https://tratt.net/laurie/blog/2018/why_arent_more_users_more... Though perhaps one could write a program in a way that gets reliably jitted?