Giter Club home page Giter Club logo

benchmarks's People

Contributors

tfrommen avatar

Watchers

 avatar  avatar

benchmarks's Issues

post_var_checks

What is this set of benchmarks all about

Check a specific $_POST variable's existence and equality to a comparison value.

Data Sets

  1. The $_POST variable is set and equal to the comparison value.
  2. The $_POST variable is set but not equal to the comparison value.
  3. The $_POST variable is not set.

Algorithms

The algorithms of the specific checks (and combinations) can be categorized as follows:

  1. Use isset and direct access.
  2. Use filter_input.
  3. Use filter_input and cache the value.

array_intersect_key

What is this benchmark all about

Filter all array elements having a key from a predefined set of keys.

Data Sets

  1. An array having 8 elements, and another array having 2 random keys of the first array (as values).
  2. An array having 64 elements, and another array having 16 random keys of the first array (as values).
  3. An array having 512 elements, and another array having 128 random keys of the first array (as values).

Algorithms

  1. Loop through the full array, and check for each key if it exists in the key array.
  2. Loop through the full array, and check for each key if the according element is set in the flipped key array.
  3. Loop through the keys of the full array, and check for each one if it exists in the key array.
  4. Loop through the keys of the full array, and check for each one if the according element is set in the flipped key array.
  5. Set the full array to the intersection by key (!) of itself and the flipped key array.

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.