Coder Social home page Coder Social logo

autoload-bench's People

Contributors

donquixote avatar seldaek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autoload-bench's Issues

Forked autoload-bench, interesting predictor techniques, PSR-4

Hi Jordi!
I openend a number of pull requests in the last days, I don't know if you are interested.
But finally I changed so much on it that it is probably too much to merge back into yours..
https://github.com/donquixote/autoload-bench

I added some new loaders with different predictor techniques, including some that support PSR-4 and PSR-0.
I thought some of this might be interesting for you ..

Thanks for your work on this!
Andreas

Mock out the filesystem entirely?

Hi,
I have been experimenting with class loader benchmarks some time myself, and came to the conclusion that the biggest source of statistic variation is probably the filesystem.

You already removed every require/include.. so what about also removing or mocking out file_exists() ?

The idea would be to measure the time for the basic algorithm (foreach loops and string operations) and then count the number of file_exists() and require. Where require is probably pointless, because this is going to be the same with each loader.

This can be done either by giving each loader a MockFilesystem, or by having a class with static methods, e.g. MockFilesystem::file_exists(). I'd say the mock object is more elegant.

There could also be a version of the MockFilesystem that actually does the file_exists(), and another one which doesn't.. this would add one level of indirection, but maybe that's ok? (because it is evenly distributed, every loader has to go through it)

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.