Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A recap about improving performance in PHP!

A recap about improving performance in PHP!

Creating performant PHP applications is a long and lonesome road. This talk contains a load of tools and tips to help you make your application Harder Better Faster Stronger!

Toon Verwerft

April 21, 2016
Tweet

More Decks by Toon Verwerft

Other Decks in Programming

Transcript

  1. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals
  2. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals Lot's  of  reference  counting Avoids  reference  counting
  3. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals Lot's  of  reference  counting Avoids  reference  counting Lot's of  garbage  collection Avoids  garbage  collection on  primitive  values
  4. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals Lot's  of  reference  counting Avoids  reference  counting Lot's of  garbage  collection Avoids  garbage  collection on  primitive  values No  support   for  JIT  compilers Support   for  JIT  compilers
  5. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals Lot's  of  reference  counting Avoids  reference  counting Lot's of  garbage  collection Avoids  garbage  collection on  primitive  values No  support   for  JIT  compilers Support   for  JIT  compilers More  memory  usage Less  memory  usage
  6. Zend  Engine PHPNG Allocates  zval in  HEAP  memory Allocates  zval

    on  VM  STACK  memory Pointers to  existing  zvals Creates  new  immutable  zvals Lot's  of  reference  counting Avoids  reference  counting Lot's of  garbage  collection Avoids  garbage  collection on  primitive  values No  support   for  JIT  compilers Support   for  JIT  compilers More  memory  usage Less  memory  usage SLOWER FASTER
  7. {%  for  employee  in  employees  %} <tr> <td>{{  employee.name }}</td>

    <td>{{  employee.company.name }}</td> </tr> {%  endfor %}