autoload-bench icon indicating copy to clipboard operation
autoload-bench copied to clipboard

Composer loader: reset classmap?

Open donquixote opened this issue 12 years ago • 1 comments

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?

donquixote avatar Jul 19 '13 23:07 donquixote

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.

Seldaek avatar Jul 25 '13 14:07 Seldaek