Seldaek/autoload-bench — pull request #9 by marcuswinkler (2014-01-24 20:03:33+00:00)
Title: Add cdb (constant database) loader

From the PHP documentation:
> Cdb is "a fast, reliable, lightweight package for creating and reading constant databases."

I've run into a use case where the classmap autoloader in composer doesn't seem to be the optimal solution. A project at my company with a large number of dependencies (ZF2 *and* ZF1, lots of proprietary libraries) has a classmap of about 8000 entries. Loading this map takes considerable time and memory. Yet for a typical request only about 300 classes will actually be loaded.

So I gave good old cdb a try. It seems to beat most of the other loaders in this benchmark in many scenarios.

Since I only tested this on a virtual machine (windows host, linux guest, php 5.5), I'm be very interested in your feedback.