JsonML2 vs Builder (v3)

Revision 3 of this benchmark created on


Description

A showdown between the "official" JsonML parser (JsonML2.js) and HTMLBuilder's builder.build.

Preparation HTML

<script src="https://raw.github.com/mckamey/jsonml/master/jsonml2.js"></script>
<script src="https://raw.github.com/xj9/htmlbuilder/master/builder.js"></script>
<script src="http://bitbucket.org/mckamey/duel/raw/tip/duel-js/target/duel.min.js"></script>
<script>
  var jsonMLList = ["ul", ["li",
  {
   "style": "color:red"
  }, "First Item"],
   ["li",
   {
    "title": "Some hover text.",
    "style": "color:green"
   }, "Second Item"],
   ["li", ["span",
   {
    "class": "code-example-third"
   }, "Third"], " Item"]
  ];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
JsonML2
JsonML.parse(jsonMLList);
ready
Builder
builder.build(jsonMLList);
ready
DUEL (DOM)
duel(jsonMLList)(/* no data */).toDOM();
ready
DUEL (String)
duel(jsonMLList)(/* no data */).toString();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.