Seldaek/autoload-bench — pull request #6 by donquixote (2013-07-20 01:38:35+00:00)
Title: Variations of how prefixes are registered.

The following changes:
- multiple prepare() with different variations of classes and namespaces.
- parameter $sharedPrefix allows to let all classes live in the same top-level namespace.
- parameter $prefixMapLevel allows to register second-level namespaces in PSR-0, thus horribly exploding the map of registered namespaces.

Why?

Composer class loader has a new "smart" implementation.
https://github.com/Seldaek/autoload-bench/pull/5
It checks the first character of a class, to pre-select prefixes.

This will be cool if registered namespaces are randomly distributed.
However, it won't help if all registered namespaces begin with the same first character.
E.g. if all registered namespaces are packages of the same framework or CMS, such as

Drupal\system -> modules/system/lib
Drupal\node -> modules/node/lib
Drupal\user -> modules/user/lib
...

This is a real-world use case..