Closed joanhey closed 1 year ago
Now it's showing a very small difference, from 34 to 32 bytes. Still they need to return the same response, but it's very similar.
But sometimes can be a big diff, and it's best to fix it.
Seems that this small difference is from the output_data.php
.
Now all have the same response size.
Before:
After:
So later, we can add a warning (not an error) if the length is more than 34 bytes.
Still we have the URL length difference, in the request.
2 bytes seems insignificant, but in a bench exist a big difference.
These 2 bytes in pure-php will be a drop of ~1.600 req/s.
Example of a very bad benchmark:
This image is in leaf framework repo
The people only see the Request per second, but nobody check the response size. Also the transfer rate is x2 in Slim.
no idea about slim but that is the reason to have PHP-Frameworks-Bench
The problem is that a lot of people use a Benchmarking
as Bench Marketing
.
And any trick is OK for them.
I'm tired to explain it:
A benchmark is not a competition, it's a really good tool to optimize the code. Joanhey
But to be useful, we need to measure the data correctly.
In a benchmark all need to return the same response length.
For now it's only for information, so the dev can fix it.
PD: the length is calculated only for ASCII, that for this bench is correct