| > C++ is Ahead of Time, by design; there is nothing to "just in time" compile. Can I talk to you about our Lord and Savior the CPU trace cache[1]? That is to say, I know next to nothing about how modern CPUs are actually designed and hardly more about JITs, but a modern CPU’s frontend with a microop cache sure looks JITy to me. The trace cache on NetBurst looks even more classically JITy, but by itself it was a miserable failure, so meh. In any event, a printf invocation seems like it should be too large for the cache to come into play;—on the other hand, all the predictors learning stuff over the iterations might make a meaningful impact? Seems to me like that learning, if present, would make the benchmark less interesting, not more, as an actual prospective application of string formatting seems unlikely to go through formatting the same (kind of) thing and nothing else in a tight loop. [1] https://chipsandcheese.com/2022/06/17/intels-netburst-failur... |
This is clearly not what the OP was asking about.