Smarty past test

JavaScript performance comparison

Test case created by romis

Preparation code

<script src="">
<script src="">
<script id="test_tpl" type="text/x-jsmart-tmpl">
   {foreach $books as $i => $book}
         [{$i+1}] {$book.title|upper} by {$}
            {if $book.price}                                
               Price: <span style="color:red">${$book.price}</span >
      </div >
  var data = {
    books: [{
      title: 'JavaScript: The Definitive Guide',
      author: 'David Flanagan',
      price: '31.18'
    }, {
      title: 'Murach JavaScript and DOM Scripting',
      author: 'Ray Harris'
    }, {
      title: 'Head First JavaScript',
      author: 'Michael Morrison',
      price: '29.54'

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
test 1
var tpl = new jSmart(document.getElementById('test_tpl').innerHTML);

test 2
var tpl = new jSmart(document.getElementById('test_tpl').innerHTML);

document.write(tpl.fetch(data) + tpl.fetch(data));

Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:


Comment form temporarily disabled.

Add a comment