Member-only story

JIT in PHP

Atakan Demircioğlu
Jotform Tech

This is the last article in a series I’ve written about understanding how PHP works. In this article, we will cover JIT in PHP.

For some background, I recommend my previous posts on this topic:

I’ve covered JIT before, so for this article, I’ll just share my slide notes.

Function JIT problems

  • Generally only improves the performance of CPU-bound apps
  • JIT works better with strict types (use strict_types = 1)
  • Function-based JIT can’t refer to objects
  • JIT is useful with real hot-spots
  • Doesn’t check whether the code is frequently used or not
  • Need a smarter way (Tracing JIT)

JIT-friendly code

  • Strictly typed code and functions with scalar types can help JIT to infer types and make use of CPU registers.
  • Use declare(strict_types=1);

How Do I Get Started

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (4)

Write a response