autoload-bench
autoload-bench copied to clipboard
Composer loader: reset classmap?
The composer loader (at least the version that is being benchmarked) remembers if a class does not exist, and skips the lengthy operations next time.
This is nice, but I wonder if it is intended for the benchmark? Composer gets very attractive numbers in the last benchmark (fail 500 classes), and mostly this is because of the repetition. Intended or not?
I think it should be taken into account because it can happen that hot code does check for a class's presence, and it would suck if the autoloader can't handle it gracefully. That said it might be better to have two tests, one with 500 random (unique) class names, and one with 500 times the same.