Don't blindly trust profilers

This page summarizes the projects mentioned and recommended in the original post on /r/PHP

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • msgpack.php

    A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]

  • I recently encountered an interesting case. I was trying to optimize the MessagePack unpacking, but after testing the performance of the new faster (as I thought) version, it turned out to be slower than the original implementation. Trying to figure out which part of the code was causing the slowdown, I reran the tests with Blackfire and was surprised to see that the profiler reported a 30% improvement in the new version, which was the exact opposite of my results (read the comments on the linked issue to learn why). Note that this is not a problem with this particular profiler, most PHP profilers will do the same. So I decided to share this finding and encourage you not to blindly trust profilers and always do your own benchmarking, especially when you do such micro-optimizations.

  • php-spx

    A simple & straight-to-the-point PHP profiling extension with its built-in web UI

  • I've written a bit about this issue in php-spx's README https://github.com/NoiseByNorthwest/php-spx#notes-on-accuracy

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts