Code Monkey home page Code Monkey logo

twing-benchmark's Introduction

twig.js versus Twing benchmark

A comparison benchmark of the latest versions of twig.js and Twing.

The protocol

This benchmark is based on the Smarty versus TwigPHP benchmark by dominics:

  • Extending one base template and overriding its blocks
  • 3 blocks, with varying default content
  • A single for loop, outputting elements of an array within one block

Usage

npm install

npm start

Results

On my machine, with twig.js ^1.12.0 and Twing ^2.0.0, node.js 10.9.0, 100000 iterations, compile time ignored, cache warmed:

Benchmark Time Taken
twig.js ~5 seconds
Twing ~0.6 second

As a matter of comparison, here are the results I get from Smarty versus TwigPHP benchmark on the same machine with TwigPHP 2.5.0, PHP 7.1.17, 100000 iterations, compile time ignored, cache warmed:

Benchmark Time Taken
TwigPHP ~0.8 second

twing-benchmark's People

Contributors

ericmorand avatar ericmorand-emakina avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

twing-benchmark's Issues

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.