Smarty past test
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//jsmart.googlecode.com/files/smart-2.9.min.js">
</script>
<script id="test_tpl" type="text/x-jsmart-tmpl">
{foreach $books as $i => $book}
<div>
[{$i+1}] {$book.title|upper} by {$book.author}
{if $book.price}
Price: <span style="color:red">${$book.price}</span >
{/if}
</div >
{/foreach}
</script>
<script type="text/javascript">
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'
}]
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
test 1 |
|
pending… |
test 2 |
|
pending… |
Compare results of other browsers
Revisions
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:
- Revision 1: published by romis
- Revision 2: published
0 comments