athletic icon indicating copy to clipboard operation
athletic copied to clipboard

Add warm up iterations

Open malkusch opened this issue 9 years ago • 3 comments

I'm not sure if this is really necessary in vanilla PHP, at least it won't hurt. HHVM uses a JIT and would benefit from a warm up phase.

malkusch avatar May 09 '15 21:05 malkusch

Does instructing the HHVM JIT to perform an immediate warm-up help?

hhvm -v Eval.Jit=1 -v Eval.JitProfileInterpRequests=0 ./vendor/bin/athletic -p ./tests/

Note: If using HHVM < 3.4, change Eval.JitProfileInterpRequests to Eval.JitWarmupRequests.

bishopb avatar May 28 '15 18:05 bishopb

Regardless, PHP 7 has an experimental JIT, so a general purpose warm-up specification might work out just fine. Something like:

/**
 * @iterations 1000, 10
 */

bishopb avatar May 28 '15 18:05 bishopb

++, someone want to send a PR? I'm pretty hands-off on this library nowadays

Even if vanilla PHP doesn't JIT anything, it'd help prime CPU caches, OS page cache, etc.

polyfractal avatar Sep 04 '15 14:09 polyfractal