Tags

benchmarking

7 posts

Internals8 min read

The opcode is not the handler

The same loop ran 23% faster with int parameters, and only with OPcache on. Operand classes pick a handler when the file compiles; proven types pick a different one.

Internals9 min read

A declared property is cheaper than an array key

One hundred thousand four-field records cost 143.54 bytes each as objects and 397.14 as associative arrays. Where the crossover is, and what one undeclared property costs.

Performance7 min read

Benchmarking PHP without lying to yourself

Microbenchmarks measure exactly what you tell them to, which is rarely what you meant. Method, noise, and the numbers worth reporting.

Arrow keys to move, Enter to open.